mikeal/request — Issue #185: Make json default
Author: johnnywengluu
Created: 2012-02-23 01:48:49+00:00
State: open

Suggestion 1:

Could json be made default so we can eliminate the "json: true" line:

request.post(url, {
json: true,
body: {
foo: 'bar'
},
}, callback);

Suggestion 2:

At the moment when setting json to true will generate Content-Type: application/json header but not Accept: application/json. Could the latter be generated as well since often you wanna send and retrieve json. If someone wants to send json but retrieve any other format instead they could just overwrite the default with specifically setting the Accept header.

What do you think?