Created
May 22, 2019 14:19
Star
You must be signed in to star a gist
debug_http_requests.php Debug WordPress http api requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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