Merge pull request #19 from fluffff/merge-config

fix: 修复 mergeConfig 字段缺失的问题
pull/20/head
初秋 2021-05-29 12:05:19 +08:00 committed by GitHub
commit bf1619e26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -54,12 +54,16 @@ function deepMergeConfig(
});
}
const onlyFromConfig2Keys: AxiosRequestConfigKey[] = ['url', 'method', 'data'];
const onlyFromConfig2Keys: AxiosRequestConfigKey[] = [
'url',
'method',
'data',
'upload',
'download',
];
const priorityFromConfig2Keys: AxiosRequestConfigKey[] = [
'adapter',
'baseURL',
'method',
'validateStatus',
'paramsSerializer',
'transformRequest',
'transformResponse',

View File

@ -3,7 +3,6 @@ import { AxiosRequestConfig } from './core/Axios';
const defaults: AxiosRequestConfig = {
adapter: getAdapterDefault(),
method: 'get',
headers: {
common: {
Accept: 'application/json, test/plain, */*',