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
如果参数是FormData且里面带文件参数就不行了
The text was updated successfully, but these errors were encountered:
我也碰见了,用原生axios的解决了。
Sorry, something went wrong.
源码中index.ts 入口 const allParams = Object.assign({}, this.defaultConfig.defaultParams, params) 导致formdata被损毁 后面判断的时候加上一句 if (contentType === ContentType.form) { requestConfig.data = qs.stringify(allParams) } else if (contentType === ContentType.multipart) { requestConfig.data = params }
const allParams = Object.assign({}, this.defaultConfig.defaultParams, params)
if (contentType === ContentType.form) { requestConfig.data = qs.stringify(allParams) } else if (contentType === ContentType.multipart) { requestConfig.data = params }
这个是axios 的上层简单封装,主要为了常规接口模型转换问题,上传文件一般是不需要返回模型的,没考虑。直接用axios 吧。
No branches or pull requests
如果参数是FormData且里面带文件参数就不行了
The text was updated successfully, but these errors were encountered: