fix: 修复 mergeConfig 字段缺失的问题
parent
1489b19eb4
commit
e7e821faae
|
@ -54,12 +54,16 @@ function deepMergeConfig(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const onlyFromConfig2Keys: AxiosRequestConfigKey[] = ['url', 'method', 'data'];
|
const onlyFromConfig2Keys: AxiosRequestConfigKey[] = [
|
||||||
|
'url',
|
||||||
|
'method',
|
||||||
|
'data',
|
||||||
|
'upload',
|
||||||
|
'download',
|
||||||
|
];
|
||||||
const priorityFromConfig2Keys: AxiosRequestConfigKey[] = [
|
const priorityFromConfig2Keys: AxiosRequestConfigKey[] = [
|
||||||
'adapter',
|
'adapter',
|
||||||
'baseURL',
|
'baseURL',
|
||||||
'method',
|
|
||||||
'validateStatus',
|
|
||||||
'paramsSerializer',
|
'paramsSerializer',
|
||||||
'transformRequest',
|
'transformRequest',
|
||||||
'transformResponse',
|
'transformResponse',
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { AxiosRequestConfig } from './core/Axios';
|
||||||
|
|
||||||
const defaults: AxiosRequestConfig = {
|
const defaults: AxiosRequestConfig = {
|
||||||
adapter: getAdapterDefault(),
|
adapter: getAdapterDefault(),
|
||||||
method: 'get',
|
|
||||||
headers: {
|
headers: {
|
||||||
common: {
|
common: {
|
||||||
Accept: 'application/json, test/plain, */*',
|
Accept: 'application/json, test/plain, */*',
|
||||||
|
|
Loading…
Reference in New Issue