mirror of
https://github.com/tenrok/axios.git
synced 2026-05-27 14:47:43 +03:00
Merge pull request #1122 from Nilegfx/bugfix/allow-method-in-instance-config
Fixing default method for an instance always overwritten by get
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -26,6 +26,7 @@ function getDefaultAdapter() {
|
||||
}
|
||||
|
||||
var defaults = {
|
||||
method: 'get',
|
||||
adapter: getDefaultAdapter(),
|
||||
|
||||
transformRequest: [function transformRequest(data, headers) {
|
||||
|
||||
Reference in New Issue
Block a user