Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var options = _.extend(url.parse(u), httpsOptions);
- console.log('getting: ' + u);
- var req = https.get(options, function(res) {
- console.log(res);
- res.pipe(file);
- file.on('finish', function() {
- file.close();
- logger.success('downloaded ' + u);
- });
- });
- req.end();
- req.on('error', function(e) {
- console.error(e);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement