Skip to content

Instantly share code, notes, and snippets.

@roidrage
Forked from isaacs/c.js
Created March 13, 2014 17:41
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 roidrage/9533176 to your computer and use it in GitHub Desktop.
Save roidrage/9533176 to your computer and use it in GitHub Desktop.
var ip = '199.27.72.162'
var https = require('https')
https.get({
host: ip,
port: 443,
path: '/graceful-fs',
headers: {
host: 'registry.npmjs.org'
}
}, function(res) {
console.error(res.headers)
var j = ''
res.setEncoding('utf8')
res.on('data', function(c) {
j += c
})
res.on('end', function() {
j = JSON.parse(j)
console.error('ok')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment