Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marti1125/1cf7eb9571f6d925f20bf8fa866d632c to your computer and use it in GitHub Desktop.
Save marti1125/1cf7eb9571f6d925f20bf8fa866d632c to your computer and use it in GitHub Desktop.
http get
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);
});
@marti1125
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment