Skip to content

Commit

Permalink
Improved jsonReviver documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
poislagarde committed Dec 9, 2014
1 parent 3a0590b commit 98821ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -537,7 +537,8 @@ The first argument can be either a `url` or an `options` object. The only requir
(the default is `chunked: true`). In non-chunked requests, data items with
body streams are not allowed.
* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON, with an optional `jsonReviver` that is passed to `JSON.parse()`.
* `json` - sets `body` but 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.
* `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.
* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
Expand Down

0 comments on commit 98821ed

Please sign in to comment.