Curl
Implements TransportInterfaceHTTP transport class for using cURL.
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
Constructor. CURLOPT_FOLLOWLOCATION must be disabled when open_basedir or safe_mode are enabled.
__construct(array|\ArrayAccess options = array()) : mixed
| link | |
|---|---|
| since |
1.0 |
| throws |
|
Arguments
- options
array|\ArrayAccessClient options array.
Response
mixed
getResponse
Method to get a response object from a server response.
getResponse(string content, array info) : \Joomla\Http\Response
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- content
stringThe complete server response, including headers as a string if the response has no errors.- info
arrayThe cURL request information.
Response
\Joomla\Http\Response
isSupported
Method to check if HTTP transport cURL is available for use
isSupported() : bool
| since |
1.0 |
|---|
Response
boolTrue if available, else false
mapProtocolVersion
Get the cURL constant for a HTTP protocol version
mapProtocolVersion(string version) : int
| since |
1.3.1 |
|---|
Arguments
- version
stringThe HTTP protocol version to use
Response
int
redirectsAllowed
Check if redirects are allowed
redirectsAllowed() : bool
| since |
1.2.1 |
|---|
Response
bool
request
Send a request to the server and return a Response object with the response.
request(string method, \Joomla\Uri\UriInterface uri, mixed data = null, array headers = null, int timeout = null, string userAgent = null) : \Joomla\Http\Response
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- method
stringThe HTTP method for sending the request.- uri
\Joomla\Uri\UriInterfaceThe URI to the resource to request.- data
mixedEither an associative array or a string to be sent with the request.- headers
arrayAn 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.
Response
\Joomla\Http\Response
setCAOptionAndValue
Configure the cURL resources with the appropriate root certificates.
setCAOptionAndValue(resource ch) : void
| since |
1.3.2 |
|---|
Arguments
- ch
resourceThe cURL resource you want to configure the certificates on.
Properties
options
The client options.
| since |
1.0 |
|---|
Type(s)
array|\ArrayAccess