Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
Created November 25, 2011 14:35
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 piscisaureus/1393656 to your computer and use it in GitHub Desktop.
Save piscisaureus/1393656 to your computer and use it in GitHub Desktop.
var url = "https://registry.npmjs.org/cloud9/-/cloud9-0.5.1.tgz";
var request = require('url').parse(url);
require('https').get(request, function(response) {
response.pipe(require('fs').createWriteStream('out.tgz'));
response.on('data', function(b) { console.log('received ' + b.length); });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment