fix: 修复 mergeConfig 字段缺失的问题

pull/19/head
954270063@qq.com 2021-05-29 12:04:11 +08:00
parent 1489b19eb4
commit e7e821faae
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, */*',