Skip to content

Instantly share code, notes, and snippets.

@mmalecki
Created August 14, 2011 16:56
Show Gist options
  • Save mmalecki/1145067 to your computer and use it in GitHub Desktop.
Save mmalecki/1145067 to your computer and use it in GitHub Desktop.
https = require('https')
setInterval(function(){console.log("still alive...")}, 1000)
https.get({ headers: {},
path: '/barista/-/barista-0.0.3.tgz',
host: 'registry.npmjs.org',
port: 443,
secure: true,
agent : false, // remove THIS
}, function(res) {
console.log("statusCode: ", res.statusCode);
console.log("headers: ", res.headers);
res.on('data', function(d) {
process.stdout.write(d);
});
}).on('error', function(e) {
console.error(e);
});
https = require('https')
setInterval(function(){console.log("still alive...")}, 1000)
https.get({ headers: {},
path: '/barista/-/barista-0.0.3.tgz',
host: 'registry.npmjs.org',
port: 443,
secure: true,
}, function(res) {
console.log("statusCode: ", res.statusCode);
console.log("headers: ", res.headers);
res.on('data', function(d) {
process.stdout.write(d);
});
}).on('error', function(e) {
console.error(e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment