On this page
Requests_Transport_cURL::get_subrequest_handle( string $url, array $headers, string|array $data, array $options ): resource
Get the cURL handle for use in a multi-request
Parameters
$urlstring Required-
URL to request
$headersarray Required-
Associative array of request headers
$datastring|array Required-
Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
$optionsarray Required-
Request options, see Requests::response() for documentation
Return
resource Subrequest's cURL handle
Source
File: wp-includes/Requests/Transport/cURL.php. View all references
public function &get_subrequest_handle($url, $headers, $data, $options) {
$this->setup_handle($url, $headers, $data, $options);
if ($options['filename'] !== false) {
$this->stream_handle = fopen($options['filename'], 'wb');
}
$this->response_data = '';
$this->response_bytes = 0;
$this->response_byte_limit = false;
if ($options['max_bytes'] !== false) {
$this->response_byte_limit = $options['max_bytes'];
}
$this->hooks = $options['hooks'];
return $this->handle;
}
Related
Uses
| Uses | Description |
|---|---|
| Requests_Transport_cURL::setup_handle() wp-includes/Requests/Transport/cURL.php | Setup the cURL handle for the given data |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_transport_curl/get_subrequest_handle