Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created March 9, 2011 20:31
Show Gist options
  • Save isaacs/862940 to your computer and use it in GitHub Desktop.
Save isaacs/862940 to your computer and use it in GitHub Desktop.
var http = require('http')
var options = {
host: 'registry.npmjs.org',
port: 80,
path: '/express'
};
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