Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Can't download images #615

micahlmartin opened this Issue · 3 comments

4 participants


I'm trying to download an image the way it's described in the readme. Here is my code:


The problem is that the file is always 0 bytes. If I download with the standard https library and handle the data and end events it works just fine. Is there something I'm doing wrong?


I have tested, It is OK on my side.

@nylen nylen closed this

This happened to me when I process.exit()ed before the downloads where finished.

To listen for the event:

var r = request("").pipe(fs.createWriteStream('google_favicon_128.png'))
r.on( "finish", function () { ... callback... } );

That works. Note that you're actually getting the finish event from the stream returned by fs.createWriteStream(), since pipe() returns the destination stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.