Skip to content

Commit

Permalink
Merge pull request #1122 from Nilegfx/bugfix/allow-method-in-instance…
Browse files Browse the repository at this point in the history
…-config

Fixing default method for an instance always overwritten by get
  • Loading branch information
emilyemorehouse committed Feb 20, 2018
2 parents d59c70f + b692057 commit a105872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/Axios.js
Expand Up @@ -32,7 +32,7 @@ Axios.prototype.request = function request(config) {
}, arguments[1]);
}

config = utils.merge(defaults, {method: 'get'}, this.defaults, config);
config = utils.merge(defaults, this.defaults, config);
config.method = config.method.toLowerCase();

// Hook up interceptors middleware
Expand Down
1 change: 1 addition & 0 deletions lib/defaults.js
Expand Up @@ -26,6 +26,7 @@ function getDefaultAdapter() {
}

var defaults = {
method: 'get',
adapter: getDefaultAdapter(),

transformRequest: [function transformRequest(data, headers) {
Expand Down

0 comments on commit a105872

Please sign in to comment.