| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
cURL HTTP transport
| File Size: | 641 lines (20 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct() X-Ref |
| Constructor |
| __destruct() X-Ref |
| Destructor |
| request($url, $headers = [], $data = [], $options = []) X-Ref |
| Perform a request param: string|Stringable $url URL to request param: array $headers Associative array of request headers param: string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD param: array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation return: string Raw HTTP result |
| request_multiple($requests, $options) X-Ref |
| Send multiple requests simultaneously param: array $requests Request data param: array $options Global options return: array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well) |
| get_subrequest_handle($url, $headers, $data, $options) X-Ref |
| Get the cURL handle for use in a multi-request param: string $url URL to request param: array $headers Associative array of request headers param: string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD param: array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation return: resource|\CurlHandle Subrequest's cURL handle |
| setup_handle($url, $headers, $data, $options) X-Ref |
| Setup the cURL handle for the given data param: string $url URL to request param: array $headers Associative array of request headers param: string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD param: array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation |
| process_response($response, $options) X-Ref |
| Process a response param: string $response Response data from the body param: array $options Request options return: string|false HTTP response data including headers. False if non-blocking. |
| stream_headers($handle, $headers) X-Ref |
| Collect the headers as they are received param: resource|\CurlHandle $handle cURL handle param: string $headers Header string return: integer Length of provided header |
| stream_body($handle, $data) X-Ref |
| Collect data as it's received since: 1.6.1 param: resource|\CurlHandle $handle cURL handle param: string $data Body data return: integer Length of provided data |
| format_get($url, $data) X-Ref |
| Format a URL given GET data param: string $url param: array|object $data Data to build query using, see {@link https://www.php.net/http_build_query} return: string URL with data |
| test($capabilities = []) X-Ref |
| Self-test whether the transport can be used. The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}. param: array<string, bool> $capabilities Optional. Associative array of capabilities to test against, i.e. `['<capability>' => true]`. return: bool Whether the transport can be used. |
| get_expect_header($data) X-Ref |
| Get the correct "Expect" header for the given request data. param: string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD. return: string The "Expect" header. |
| Generated: Mon Dec 6 01:00:03 2021 | Cross-referenced by PHPXref 0.7.1 |