Skip to content

Instantly share code, notes, and snippets.

@a0viedo
Created September 30, 2014 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a0viedo/5404d3bba7b2f031b3d5 to your computer and use it in GitHub Desktop.
Save a0viedo/5404d3bba7b2f031b3d5 to your computer and use it in GitHub Desktop.
var http = require('http');
http.get("http://www.google.com/index.html", function(res) {
console.log("Got response: " + res.statusCode);
res.on('data', function(){
console.log('data');
}).on('end', function(){
console.log('end');
})
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment