fix comments
This commit is contained in:
parent
b5788f6db1
commit
81f15790d6
|
@ -33,8 +33,7 @@ The first argument can be either a `url` or an `options` object. The only requir
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. <!--
|
- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. <!-- - `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
|
||||||
- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
|
|
||||||
- `formData` - data to pass for a `multipart/form-data` request. See
|
- `formData` - data to pass for a `multipart/form-data` request. See
|
||||||
[Forms](#forms) section above.
|
[Forms](#forms) section above.
|
||||||
- `multipart` - array of objects which contain their own headers and `body`
|
- `multipart` - array of objects which contain their own headers and `body`
|
||||||
|
@ -47,8 +46,7 @@ The first argument can be either a `url` or an `options` object. The only requir
|
||||||
- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
|
- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
|
||||||
- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
|
- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
|
||||||
-->
|
-->
|
||||||
- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. <!--
|
- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. <!-- - `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
|
||||||
- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
|
|
||||||
- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body.
|
- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -62,8 +60,7 @@ The first argument can be either a `url` or an `options` object. The only requir
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) <!--
|
- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) <!-- - `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
|
||||||
- `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
|
|
||||||
- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
|
- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue