http_api_curl action-hookWP 2.8.0

Fires before the cURL request is executed.

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

Usage

add_action( 'http_api_curl', 'wp_kama_http_api_curl_action', 10, 3 );

/**
 * Function for `http_api_curl` action-hook.
 * 
 * @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.
 *
 * @return void
 */
function wp_kama_http_api_curl_action( $handle, $parsed_args, $url ){

	// action...
}
$handle(resource)
The cURL handle returned by curl_init() (passed by reference).
$parsed_args(array)
The HTTP request arguments.
$url(string)
The request URL.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Http_Curl::request()
http_api_curl
WP_HTTP_Requests_Hooks::dispatch()
http_api_curl
wp-includes/class-wp-http-curl.php 230
do_action_ref_array( 'http_api_curl', array( &$handle, $parsed_args, $url ) );
wp-includes/class-wp-http-requests-hooks.php 57
do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );

Where the hook is used in WordPress

Usage not found.