Created
July 8, 2016 00:01
-
-
Save marti1125/1cf7eb9571f6d925f20bf8fa866d632c to your computer and use it in GitHub Desktop.
http get
This file contains hidden or 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
const http = require('http'); | |
var options = { | |
host: 'www.thestartv.com', | |
port: 80, | |
path: '/' | |
}; | |
http.get(options, function(res) { | |
console.log("Got response: " + res.statusCode); | |
}).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
http://stackoverflow.com/questions/9750510/json-parse-error-in-node-js