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 实例,并且没有create 项目内:
import axios from 'axios' axios.defaults.headers.Authorization = 'fdsafsda'
npm 包esdk-obs-browserjs 内
import axios from 'axios' axios.request()
表现:
包内request headers 会携带 Authorization 导致请求失败。
期望: 包内axios 应使用 create 重新new 一个实例,避免和项目内实例互相污染。
create
import axios from 'axios' const http = axios.create() http.request()
The text was updated successfully, but these errors were encountered:
你自己项目也可以 create 一个吧
Sorry, something went wrong.
是的,我现在就是这样解决的。
对于一个sdk来说,这就是一个bug,对我的项目有侵入性了。
这个确实是个问题,下个版本我们会在sdk里面创建一个axios实例,不会影响上层服务。非常感谢您的反馈。
No branches or pull requests
项目内使用了axios 实例,并且没有create
项目内:
npm 包esdk-obs-browserjs 内
表现:
包内request headers 会携带 Authorization 导致请求失败。
期望:
包内axios 应使用
create
重新new 一个实例,避免和项目内实例互相污染。The text was updated successfully, but these errors were encountered: