Browse Source

Clarify how `body` is stringified when an object

Some think that `JSON.stringify` will be used.
http2
Vsevolod Strukchinsky 10 years ago
committed by Sindre Sorhus
parent
commit
a14392fee2
  1. 2
      readme.md

2
readme.md

@ -82,7 +82,7 @@ If present in `options` and `options.method` is not set, `options.method` will b
If `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length.
If `body` is a plain Object, it will be stringified and sent as `application/x-www-form-urlencoded`.
If `body` is a plain Object, it will be stringified with [`querystring.stringify`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) and sent as `application/x-www-form-urlencoded`.
###### encoding

Loading…
Cancel
Save