Last active
August 29, 2015 14:18
-
-
Save borislav-angelov/389bb6b67c2da327ca35 to your computer and use it in GitHub Desktop.
WP HTTP Debug
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', 'viper_http_api_debug', 10, 5 ); | |
public function viper_http_api_debug( $response, $type, $class, $args, $url ) { | |
$output = 'Request URL: ' . var_export( $url, true ); | |
$output .= 'Request Args: ' . var_export( $args, true ); | |
$output .= 'Request Response : ' . var_export( $response, true ); | |
echo $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment