http_api_curl
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' );
/**
* Function for `http_api_curl` action-hook.
*
* @param resource $handle The cURL handle returned by curl_init() (passed by reference).
*
* @return void
*/
function wp_kama_http_api_curl_action( $handle ){
// action...
}
- $handle(resource)
- The cURL handle returned by curl_init() (passed by reference).
Changelog
| Since 2.8.0 | Introduced. |
Where the hook is called
http_api_curl
wp-includes/class-wp-http-curl.php 236
do_action_ref_array( 'http_api_curl', array( &$handle, $parsed_args, $url ) );
wp-includes/class-wp-http-requests-hooks.php 58
do_action_ref_array( 'http_api_curl', array( &$parameters[0], $this->request, $this->url ) );