axiosRetry参数首字母小写 (#2419)

* feat(axiosSuccess): 操作成功后根据传入提示模式进行相应

* fix(axiosRetry): 解决get重试请求返回的headers造成无法成功请求的问题

* fix(axiosRetry): 参数首字母小写
This commit is contained in:
mfish 2022-11-24 18:16:34 +08:00 committed by GitHub
parent 43c8bf0d0b
commit ce030d2d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ export class AxiosRetry {
/**
*
*/
retry(AxiosInstance: AxiosInstance, error: AxiosError) {
retry(axiosInstance: AxiosInstance, error: AxiosError) {
// @ts-ignore
const { config } = error.response;
const { waitTime, count } = config?.requestOptions?.retryRequest;
@ -18,7 +18,7 @@ export class AxiosRetry {
config.__retryCount += 1;
//请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers
delete config.headers;
return this.delay(waitTime).then(() => AxiosInstance(config));
return this.delay(waitTime).then(() => axiosInstance(config));
}
/**