wppaste
WordPress

do_action_ref_array( 'http_api_curl', resource $handle, array $parsed_args, string $url )

Since
2.8.0
Fires before the cURL request is executed.

Description

Cookies are not currently handled by the HTTP API. This action allows plugins to handle cookies themselves.

Compatibility

WordPress
since 2.8.0
  • 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).

Parameters

$handleresource
The cURL handle returned by curl_init() (passed by reference).
$parsed_argsarray
The HTTP request arguments.
$urlstring
The request URL.

Where this hook fires · 2

  • wp-includes/class-wp-http-curl.php:236WP_Http_Curl::request()
  • wp-includes/class-wp-http-requests-hooks.php:58WP_HTTP_Requests_Hooks::dispatch()

Source code

		 * @since 2.8.0		 *		 * @param resource $handle      The cURL handle returned by curl_init() (passed by reference).		 * @param array    $parsed_args The HTTP request arguments.		 * @param string   $url         The request URL.		 */		do_action_ref_array( 'http_api_curl', array( &$handle, $parsed_args, $url ) ); 		// We don't need to return the body, so don't. Just execute request and return.		if ( ! $parsed_args['blocking'] ) {			curl_exec( $handle ); 			$curl_error = curl_error( $handle );

Changelog

Introduced in 2.8.0. 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, 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.