var http = require('http'); var options = { method: 'GET', host: 'www.google.com', port: 80, path: '/index.html' }; http.request( options, function(err, resBody){ console.log("hey"); console.log(resBody); if (err) { console.log("YOYO"); return; } } );
For some reason, it just shuts off and writes nothing to the console.
I know I can require('request') , but I need to use http for compatibility with the plugin I use.
Also, background in my versions: Node v0.8.2
source share