上传图片时报错400.
no multipart boundary param in Content-Type
解决方法:把 headers 里的 content-type 清空
Retrofit的注解也去掉。
@Headers("Content-Type: application/json")
本文介绍了在使用Retrofit进行图片上传时遇到400错误的原因及解决方案。问题出在Content-Type设置上,通过清除headers中的Content-Type并调整Retrofit注解,可以成功解决此问题,确保图片上传功能正常运行。
上传图片时报错400.
no multipart boundary param in Content-Type
解决方法:把 headers 里的 content-type 清空
Retrofit的注解也去掉。
@Headers("Content-Type: application/json")
719
1331

被折叠的 条评论
为什么被折叠?
