-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defaults(): use extend for "deep" defaulting
defaults() does shallow defaulting. For example, when the default options are `{ qs: { foo: 123 } }` and the options are `{ qs: { bar: 321 } }`, the resulting options are `{ qs: { bar: 321 } }`. It should instead do a "deep" merge of the options and default options. The result of the deep merge would be `{ qs: { foo: 123, bar: 321 } }`. Fix this issue by using [extend](https://github.com/justmoon/node-extend). This is what request [does](https://github.com/request/request/blob/master/index.js#L90).
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters