feross / simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
MIT License
401 stars 50 forks source link

Add support for POST application/x-www-form-urlencoded #18

Closed ocordeiro closed 7 years ago

ocordeiro commented 7 years ago

continue "simplest and < 100 lines"

use passing form object in opts.

get({url: 'http://...', form: {foo: 'bar'}}, () => {})
yciabaud commented 7 years ago

Thanks for this contribution @alamcordeiro! It looks good and I believe this can be useful but can you consider adding a test case for this?

ocordeiro commented 7 years ago

Thanks, test added now

ocordeiro commented 7 years ago

Thanks for tips. This is the goal? https://github.com/alamcordeiro/simple-get/commit/21aba210535032d8f23cfd7815defdec0d9fd6c2

ocordeiro commented 7 years ago

@feross