CurlTransport
Extends AbstractTransport Implements TransportInterfaceHTTP transport class for using cURL.
| since |
1.7.3 |
|---|---|
| package |
Joomla CMS |
Methods
getResponse
Method to get a response object from a server response.
getResponse( content, mixed||string|int info) : \Joomla\CMS\Http\Response
| since |
1.7.3 |
|---|---|
| throws |
|
Arguments
- content
stringThe complete server response, including headers as a string if the response has no errors.- info
array<string|int, mixed>The cURL request information.
Response
isSupported
Method to check if HTTP transport cURL is available for use
isSupported() :
| since |
3.0.0 |
|---|
Response
booltrue if available, else false
redirectsAllowed
Check if redirects are allowed
redirectsAllowed() :
| since |
3.0.0 |
|---|
Response
bool
request
Send a request to the server and return a Response object with the response.
request( method, \Joomla\Uri\UriInterface uri, data = null, mixed||string|int headers = [], timeout = null, userAgent = null) : \Joomla\CMS\Http\Response
| since |
1.7.3 |
|---|---|
| throws |
|
Arguments
- method
stringThe HTTP method for sending the request.- uri
UriInterfaceThe URI to the resource to request.- data
mixedEither an associative array or a string to be sent with the request.- headers
array<string|int, mixed>An array of request headers to send with the request.- timeout
intRead timeout in seconds.- userAgent
stringThe optional user agent string to send with the request.