-
Notifications
You must be signed in to change notification settings - Fork 124
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
关于文件上传Content-Type的问题 #124
Labels
Comments
@stevennight |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先下面是我的调试的代码:
这边需要上传文件到钉钉的接口。
按照文档的方式提交到文档的示例地址( http:https://httpbin.org/post )没有问题,但是传到钉钉,钉钉会返回一个“
{"errcode":43008,"errmsg":"参数需要multipart类型"}
”。在经过直接调用Swoole的Http Client测试没有问题之后,输出了两种方式的client实例:
发现了Saber的Client中带上了Content-Type。尝试在saber的option中带上content_type = null之后解决问题。
之前尝试把这个content_type设置为:ContentType::MULTIPART,以失败告终。(需要multipart类型)设置为'multipart/form-data; boundary=--xxxxxx' 则提示“缺少参数 media”。
由于是自己试出来的方式,也不知道这种处理方式稳不稳妥?比如后续版本把null给处理了?
心里有点不踏实,希望开发者能帮忙看看,谢谢大佬。
The text was updated successfully, but these errors were encountered: