Skip to content

Commit

Permalink
Merge pull request #1251 from nylen/document-defaults
Browse files Browse the repository at this point in the history
Clarify that defaults() does not modify global defaults
  • Loading branch information
nylen committed Nov 10, 2014
2 parents 9636cff + 7afda90 commit f2abdc9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -565,9 +565,14 @@ There are also shorthand methods for different HTTP METHODs and some other conve
### request.defaults(options)
This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.
This method **returns a wrapper** around the normal request API that defaults
to whatever options you pass to it.
**Note:** You can call `.defaults()` on the wrapper that is returned from `request.defaults` to add/override defaults that were previously defaulted.
**Note:** `request.defaults()` **does not** modify the global request API;
instead, it **returns a wrapper** that has your default settings applied to it.
**Note:** You can call `.defaults()` on the wrapper that is returned from
`request.defaults` to add/override defaults that were previously defaulted.
For example:
```javascript
Expand Down

0 comments on commit f2abdc9

Please sign in to comment.