Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vs request module #4

Closed
timoxley opened this issue Jun 13, 2014 · 2 comments
Closed

vs request module #4

timoxley opened this issue Jun 13, 2014 · 2 comments

Comments

@timoxley
Copy link

You may want to look into the request package which basically does the same thing as this but doesn't require managing any temporary files or most importantly: doesn't load all the data into memory before processing it.

e.g.

request('http://example.com/file.txt')
.pipe(zlib.createUnzip())
.pipe(fs.createWriteStream('/dir/file.txt'))
.on('end', function() {
  // done.
})
@timoxley
Copy link
Author

hooray streams.

@tschaub
Copy link
Owner

tschaub commented Jun 13, 2014

I agree that things could be simplified here, but this module already does already use request (and streams). And to handle zipfile archives, you need to at least buffer (though not necessarily write temp files).

@tschaub tschaub closed this as completed Sep 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants