var request = require('request');
request('http://www.google.com', function (error, response, body) {
});
Use the request-debug module to view request and response headers and bodies
If you specify your own handling function, r will be the Request instance that generated the event, and type will be one of the following values:require('request-debug')(request, function(type, data, r) { // put your request or response handling logic here });
request - Headers were sent to the server and will be included as data.headers. data.body may also be present for POST requests.