cURL HTTP transport
| package | Requests |
|---|---|
| subpackage | Transport |
__construct()
__destruct()
get_subrequest_handle(string $url, array $headers, string|array $data, array $options) : resource
stringURL to request
arrayAssociative array of request headers
stringarrayData to send either as the POST body, or as parameters in the URL for a GET/HEAD
arrayRequest options, see {@see Requests::response()} for documentation
resourceSubrequest's cURL handleprocess_response(string $response, array $options) : string
stringResponse data from the body
arrayRequest options
stringHTTP response data including headersrequest(string $url, array $headers= array(), string|array $data= array(), array $options= array()) : string
| inherited_from | \Requests_Transport::request() |
|---|
stringURL to request
arrayAssociative array of request headers
stringarrayData to send either as the POST body, or as parameters in the URL for a GET/HEAD
arrayRequest options, see {@see Requests::response()} for documentation
\Requests_Exception |
On a cURL error (`curlerror`) |
|---|
stringRaw HTTP resultrequest_multiple(array $requests, array $options) : array
| inherited_from | \Requests_Transport::request_multiple() |
|---|
arrayRequest data
arrayGlobal options
arrayArray of Requests_Response objects (may contain Requests_Exception or string responses as well)stream_body(resource $handle, string $data) : integer
| since | 1.6.1 |
|---|
resourcecURL resource
stringBody data
integerLength of provided datastream_headers(resource $handle, string $headers) : integer
resourcecURL resource
stringHeader string
integerLength of provided headertest($capabilities = array()) : boolean
| codeCoverageIgnore | |
|---|---|
| inherited_from | \Requests_Transport::test() |
booleanTrue if the transport is valid, false otherwise.format_get(string $url, array|object $data) : string
string
stringURL with datasetup_handle(string $url, array $headers, string|array $data, array $options)
stringURL to request
arrayAssociative array of request headers
stringarrayData to send either as the POST body, or as parameters in the URL for a GET/HEAD
arrayRequest options, see {@see Requests::response()} for documentation
$headers : string
''$info : array
$response_data : string
''$version : \long
$done_headers : boolean
false$handle : resource
$hooks : \Requests_Hooks
$response_byte_limit : integer | boolean
$response_bytes : integer
$stream_handle : resource
CURL_7_10_5 = 461317
CURL_7_16_2 = 462850