Skip to content

Instantly share code, notes, and snippets.

@borislav-angelov
Last active August 29, 2015 14:18
Show Gist options
  • Save borislav-angelov/389bb6b67c2da327ca35 to your computer and use it in GitHub Desktop.
Save borislav-angelov/389bb6b67c2da327ca35 to your computer and use it in GitHub Desktop.
WP HTTP Debug
<?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