works:
wget http://curl.haxx.se/download/curl-7.40.0.tar.gz
empty file and no error:
const fs = require ('fs');
const request = require ('request');
request
.get('http://curl.haxx.se/download/curl-7.40.0.tar.gz')
.on('error', function(err) {
console.log(err)
})
.pipe(fs.createWriteStream('curl.tar.gz'));
Tested with request 2.67.0
node 4 and 5 on Debian Stretch amd64
Note that I've not this problem with many other URLs.