【发布时间】:2017-05-25 09:53:04
【问题描述】:
@FormUrlEncoded
@POST("/api/post")
Call<Response> createPost(
@Header("auth") String auth,
@Field("id") String id,
@Field("title") String title,
@Body ContentData content);
通过使用此代码,我收到错误消息“@Body 参数不能与表单或多部分编码一起使用。”。我现在该怎么办 ?我尝试将 Object 作为 String 发送,但也失败了。
【问题讨论】:
-
使用 TypedInput..
标签: android http-post retrofit2 android-json square