Commit 43c8bf0d0b373317980e500dd1d5b2bbd17ce882
Committed by
GitHub
1 parent
bc099041
解决get重试请求返回的headers造成无法成功请求的问题 (#2416)
* feat(axiosSuccess): 操作成功后根据传入提示模式进行相应 * fix(axiosRetry): 解决get重试请求返回的headers造成无法成功请求的问题
Showing
1 changed file
with
2 additions
and
0 deletions
src/utils/http/axios/axiosRetry.ts
... | ... | @@ -16,6 +16,8 @@ export class AxiosRetry { |
16 | 16 | return Promise.reject(error); |
17 | 17 | } |
18 | 18 | config.__retryCount += 1; |
19 | + //请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers | |
20 | + delete config.headers; | |
19 | 21 | return this.delay(waitTime).then(() => AxiosInstance(config)); |
20 | 22 | } |
21 | 23 | ... | ... |