wppaste
WordPress

Curl

Source
wp-includes/Requests/src/Transport/Curl.php:25
cURL HTTP transport

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 10

$headersstringpublic
Raw HTTP data
$response_datastringpublic
Raw body data
$infoarraypublic
Information on the current request
$versionintpublic
cURL version number
$handleresource|CurlHandleprivate
cURL handle
$hooksWpOrg\Requests\Hooksprivate
Hook dispatcher instance
$done_headersbooleanprivate
Have we finished the headers yet?
$stream_handleresourceprivate
If streaming to a file, keep the file pointer
$response_bytesintprivate
How many bytes are in the response body?
$response_byte_limitint|boolprivate
What's the maximum number of bytes we should keep?

Methods · 12

Source code

final class Curl implements Transport {	const CURL_7_10_5 = 0x070A05;	const CURL_7_16_2 = 0x071002; 	/**	 * Raw HTTP data	 *	 * @var string	 */	public $headers = ''; 	/**	 * Raw body data	 *	 * @var string	 */	public $response_data = ''; 	/**	 * Information on the current request	 *	 * @var array cURL information array, see {@link https://www.php.net/curl_getinfo}	 */	public $info; 	/**	 * cURL version number	 *	 * @var int	 */	public $version; 	/**	 * cURL handle	 *	 * @var resource|\CurlHandle Resource in PHP < 8.0, Instance of CurlHandle in PHP >= 8.0.	 */	private $handle; 	/**	 * Hook dispatcher instance	 *	 * @var \WpOrg\Requests\Hooks	 */	private $hooks; 	/**	 * Have we finished the headers yet?	 *	 * @var boolean	 */	private $done_headers = false; 	/**	 * If streaming to a file, keep the file pointer	 *	 * @var resource	 */	private $stream_handle; 	/**	 * How many bytes are in the response body?	 *	 * @var int	 */	private $response_bytes; 	/**	 * What's the maximum number of bytes we should keep?	 *	 * @var int|bool Byte count, or false if no limit.	 */	private $response_byte_limit; 	/**	 * Constructor	 */	public function __construct() {		$curl          = curl_version();		$this->version = $curl['version_number'];

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/Requests/src/Transport/Curl.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.