Skip to content

Commit f60d348

Browse files
committed
Fix word consistency
`user` || `username` is used to describe the user field in the `auth` hash while `password` || `pass` was used to describe the password field. The order has been flipped for consistency: `pass` || `password`.
1 parent bfea018 commit f60d348

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ request.get('http://some.server.com/', {
138138
});
139139
```
140140
141-
If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.
141+
If passed as an option, `auth` should be a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.
142142
143143
`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).
144144
@@ -230,7 +230,7 @@ The first argument can be either a `url` or an `options` object. The only requir
230230
* `headers` - http headers (default: `{}`)
231231
* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.
232232
* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).
233-
* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.
233+
* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
234234
* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
235235
* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
236236
* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)

0 commit comments

Comments
 (0)