Permalink
Browse files

Debug mode for the HTTPS request. Prints the info to STDERR via util.…

…debug.
  • Loading branch information...
1 parent 3c7067d commit e794bf8ab3f30cf96b26baa7be005aae9039ee87 @SaltwaterC committed Jan 25, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/internals.js
View
@@ -230,8 +230,20 @@ var makeRequest = function (config, options, body, handler, callback, requestId)
return;
}
}
+
+ tools.debug(options.method + ' ' + options.path);
+ tools.debug('host: ' + options.host);
+
+ var header;
+ for (header in options.headers) {
+ if (options.headers.hasOwnProperty(header)) {
+ tools.debug(header + ': ' + options.headers[header]);
+ }
+ }
+
var aborted = false;
var data = [];
+
var request = https.request(options, function (response) {
var parseXml = function (data) {
// Set the XML parser

0 comments on commit e794bf8

Please sign in to comment.