New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retry request problem #2833
Comments
i us e#1628 way. it works 。 like this: |
before webpack build: so it is incompatible about before webpack build and after webpack build. |
Closed by the issue bot. Make sure you have followed the issue template. Please open a new issue, instead of editing the current one. Maybe you can read chinesedfan/You-Dont-Know-Axios first. |
when i use axios.interceptors.response ,when check code of backserver return is 401, I refresh token and i retry the previous request. the code like this:
axios.interceptors.response.use( response => { const { data } = response; switch (parseInt(data.code)) { case 401: var newToken = ...; response.config.Authentication =newToken ; return axios.request(response.config) break; default: break; } return response; }, error => { .... } } );
and i have a setting: axios.defaults.baseURL = "/api"
one correct like this [/api/listUser],but when i retry request. the url is [/api/api/listUser], i do not know why [/api] appear twice . so the response is 404.
The text was updated successfully, but these errors were encountered: