http_response filter-hookWP 2.9.0

Filters a successful HTTP API response immediately before the response is returned.

Usage

add_filter( 'http_response', 'wp_kama_http_response_filter', 10, 3 );

/**
 * Function for `http_response` filter-hook.
 * 
 * @param array  $response    HTTP response.
 * @param array  $parsed_args HTTP request arguments.
 * @param string $url         The request URL.
 *
 * @return array
 */
function wp_kama_http_response_filter( $response, $parsed_args, $url ){

	// filter...
	return $response;
}
$response(array)
HTTP response.
$parsed_args(array)
HTTP request arguments.
$url(string)
The request URL.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

WP_Http::request()
http_response
WP_Http::_dispatch_request()
http_response
wp-includes/class-wp-http.php 449
return apply_filters( 'http_response', $response, $parsed_args, $url );
wp-includes/class-wp-http.php 602
return apply_filters( 'http_response', $response, $args, $url );

Where the hook is used in WordPress

Usage not found.