[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
HTTP API: WP_Http_Curl class
File Size: | 417 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Http_Curl:: (4 methods):
request()
stream_headers()
stream_body()
test()
Class: WP_Http_Curl - X-Ref
Core class used to integrate Curl as an HTTP transport.request( $url, $args = array() X-Ref |
Send a HTTP request to a URI using cURL extension. return: array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error param: string $url The request URL. param: string|array $args Optional. Override the defaults. |
stream_headers( $handle, $headers ) X-Ref |
Grabs the headers of the cURL request. Each header is sent individually to this callback, and is appended to the `$header` property for temporary storage. return: int Length of the request headers. param: resource $handle cURL handle. param: string $headers cURL request headers. |
stream_body( $handle, $data ) X-Ref |
Grabs the body of the cURL request. The contents of the document are passed in chunks, and are appended to the `$body` property for temporary storage. Returning a length shorter than the length of `$data` passed in will cause cURL to abort the request with `CURLE_WRITE_ERROR`. return: int Total bytes of data written. param: resource $handle cURL handle. param: string $data cURL request body. |
test( $args = array() X-Ref |
Determines whether this class can be used for retrieving a URL. return: bool False means this class can not be used, true means it can. param: array $args Optional. Array of request arguments. Default empty array. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |