diff --git a/README.md b/README.md index d32f152..2f88787 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,13 @@ request('http://www.google.com', function (error, response, body) { The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. -- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` - +- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` - `method` - http method (default: `"GET"`) - `headers` - http headers (default: `{}`) --- -- `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. - -- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. - @@ -65,8 +62,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`.) -