Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
debug_http_requests.php Debug WordPress http api requests
add_action( 'http_api_debug', 'my_http_api_debug', 10, 5 );
function my_http_api_debug( $response, $type, $class, $args, $url ) {
error_log( 'requested url: ' . var_export( $url, true ) );
error_log( 'arguments: ' . var_export( $args, true ) );
error_log( 'http response : ' . var_export( $response, true ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.