📜  在 react 中找到 401 错误并注销 axios - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.338000             🧑  作者: Mango

代码示例1
axios.interceptors.response.use(response => {
   return response;
}, error => {
  if (error.response.status === 401) {
   //place your reentry code
  }
  return error;
});