NodeJS quickly debugging http/https requests
Testing http requests requires a debugging proxy like Charles or Fiddler.
But sometimes one might need a quick shortcut to get some more details on what's going on.
In NodeJS, http and https native libraries check for an environmental variable
NODE_DEBUG, if it's equal to
http it will print debug info.
Usage would be like this:
NODE_DEBUG=http node script.js