#axios 拦截器 取消请求,#axios interceptors.request cancel a http request #使用axios在request拦截器中取消请求

instance.interceptors.request.use(config => {
  /* some logic */
  const CancelToken = Axios.CancelToken;
  return {
    ...config,
    cancelToken: new CancelToken((cancel) => cancel(‘Cancel repeated request‘))
  };
});

#axios 拦截器 取消请求,#axios interceptors.request cancel a http request #使用axios在request拦截器中取消请求

上一篇:frida主动调用app方法


下一篇:QSignalMapper类实现点击按钮跳转栈窗口