Created
September 30, 2014 17:42
-
-
Save a0viedo/5404d3bba7b2f031b3d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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