Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Merge options over requestOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Mar 22, 2017
1 parent 7ae072f commit 2e36a95
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/client-oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ function toString (str) {
* Merge request options from an options object.
*/
function requestOptions (requestOptions, options) {
return extend(requestOptions, {
body: extend(options.body, requestOptions.body),
query: extend(options.query, requestOptions.query),
headers: extend(options.headers, requestOptions.headers)
})
return {
url: requestOptions.url,
method: requestOptions.method,
body: extend(requestOptions.body, options.body),
query: extend(requestOptions.query, options.query),
headers: extend(requestOptions.headers, options.headers)
}
}

/**
Expand Down

0 comments on commit 2e36a95

Please sign in to comment.