We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在axios v0.22.0起,CancelToken已被废弃,现在使用AbortController进行替换
CancelToken
AbortController
使用AbortController进行替换
No response
基于CancelToken实现的取消请求是通过给每个请求生成唯一的请求id,供全局去调用,但是无法支持单个请求去控制,现使用AbortController需支持
The text was updated successfully, but these errors were encountered:
是打算放弃cancelRequest与cancelAllRequest 方法,还是放弃使用requestId去取消的实现?
cancelRequest
cancelAllRequest
requestId
cancelAllRequest有场景,当前会话失效后跳转登录页面时,可以取消当前所有请求(因为可能同时存在多个请求在并发,任一请求获得会话完全无效的响应即可安全取消全部请求)。
Sorry, something went wrong.
这两个方法仍然会保留
527fd79
No branches or pull requests
描述
在axios v0.22.0起,
CancelToken
已被废弃,现在使用AbortController
进行替换建议的解决方案
使用
AbortController
进行替换替代方案
No response
额外的上下文
基于
CancelToken
实现的取消请求是通过给每个请求生成唯一的请求id,供全局去调用,但是无法支持单个请求去控制,现使用AbortController
需支持The text was updated successfully, but these errors were encountered: