Get the cURL handle for use in a multi-request
Parameters
$url
stringrequired- URL to request
$headers
arrayrequired- Associative array of request headers
$data
string|arrayrequired- Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
$options
arrayrequired- Request options, see WpOrgRequestsRequests::response() for documentation
Source
$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;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.