Requests_Transport_cURL::get_subrequest_handle()
Get the cURL handle for use in a multi-request
{} It's a method of the class: Requests_Transport_cURL{}
No Hooks.
Return
resource
. Subrequest's cURL handle
Usage
$Requests_Transport_cURL = new Requests_Transport_cURL(); $Requests_Transport_cURL->&get_subrequest_handle( $url, $headers, $data, $options );
- $url(string) (required)
- URL to request
- $headers(array) (required)
- Associative array of request headers
- $data(string|array) (required)
- Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
- $options(array) (required)
- Request options, see {@see Requests::response()} for documentation
Code of Requests_Transport_cURL::get_subrequest_handle() Requests Transport cURL::get subrequest handle WP 6.0
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; }