From 2e36a9545fda9eb6f62b739bd7a12b638252ae76 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Wed, 22 Mar 2017 10:52:09 -0700 Subject: [PATCH] Merge `options` over `requestOptions` --- src/client-oauth2.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/client-oauth2.js b/src/client-oauth2.js index bee2aa2..5e0afb2 100644 --- a/src/client-oauth2.js +++ b/src/client-oauth2.js @@ -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) + } } /**