-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Feature Request] requestInterceptor支持异步 #10303
Comments
你这里的请求发的时候都要去请求一次 token ,不合理的。 建议在应用启动的时候 |
|
怎么没人回复了呢 目前流程是登录请求会获取一个 |
+1,希望支持异步,我们有类似需求,需要在请求前处理异步数据.. |
+1 我们也有数据源是需要异步获取的。 |
这种场景可以初始化的时候获取token再初始化request插件
|
也遇到这个问题,因为请求的时候需要判断token是否过期,如果过期了需要先刷新一次token,拿到最新的token再用来继续完成之前的请求工作 |
+1. I got same issue as you @KelleyYe. Axios accepts Promise type as well. Please fix |
Background
请求拦截前会注入token,但是token的获取是异步的
Proposal
希望能修改一下类型
The text was updated successfully, but these errors were encountered: