http_api_debug

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

Description

do_action( 'http_api_debug', (string) $response, (string) $response, (string) $requests, (array) $r, (string) $url ); 

Parameters (5)

0. $response (array|WP_Error)
HTTP response or WP_Error object.
1. $response (string) => 'response'
Context under which the hook is fired.
2. $requests (string) => 'Requests'
HTTP transport used.
3. $r (array)
HTTP request arguments.
4. $url (string)
The request URL.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'http_api_debug', $response, $response, $requests, $r, $url ); 
The following example is for adding a hook callback.
  1. // define the http_api_debug callback 
  2. function action_http_api_debug( $response, $response, $requests, $r, $url ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'http_api_debug', 'action_http_api_debug', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'http_api_debug', 'action_http_api_debug', 10, 5 ); 

Defined (2)

The action is defined in the following location(s).

/wp-includes/class-http.php  
  1. do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url ); 
  1. do_action( 'http_api_debug', $response, 'response', $class, $args, $url );