http_api_debug action-hookWP 2.8.0

Fires after an HTTP API response is received and before the response is returned.

Usage

add_action( 'http_api_debug', 'wp_kama_http_api_debug_action', 10, 5 );

/**
 * Function for `http_api_debug` action-hook.
 * 
 * @param array|WP_Error $response    HTTP response or WP_Error object.
 * @param string         $context     Context under which the hook is fired.
 * @param string         $class       HTTP transport used.
 * @param array          $parsed_args HTTP request arguments.
 * @param string         $url         The request URL.
 *
 * @return void
 */
function wp_kama_http_api_debug_action( $response, $context, $class, $parsed_args, $url ){

	// action...
}
$response(array|WP_Error)
HTTP response or WP_Error object.
$context(string)
Context under which the hook is fired.
$class(string)
HTTP transport used.
$parsed_args(array)
HTTP request arguments.
$url(string)
The request URL.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Http::request()
http_api_debug
WP_Http::_dispatch_request()
http_api_debug
wp-includes/class-wp-http.php 421
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 278
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 285
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 302
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
wp-includes/class-wp-http.php 594
do_action( 'http_api_debug', $response, 'response', $class, $args, $url );

Where the hook is used in WordPress

Usage not found.