request - http request module
https://github.com/mikeal/request
stream http responses to files:
request('http://google.com/doodle.png')
.pipe(fs.createWriteStream('doodle.png'));
or just use as a http client, with callbacks
request.post('http://localhost:5984/foo', { json: { foo: 'bar' }, function(err, res, body) {
console.log(body);
});
Written by Tom Wilson
Related protips
3 Responses

thanks
over 1 year ago
·

What's the benefit compared to using node.js http?
over 1 year ago
·

Lots of things:
- Simple API
- Streaming Support
- Multipart Form Support
- OAUTH Signing Support
- AWS Signing Support
- Cookie Jar Support
- defaults - See the Github Page for more details
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Nodejs
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#