Retrofit 异常( @Field parameters can only be used with form encoding)

问题:

  • 使用 @Field@FieldMap时,出现parameters can only be used with form encoding

解决:

  • 在@Field注解的函数上添加**@FormUrlEncoded**
@FormUrlEncoded
@POST("DTOGetLoginTerminal")
Call<ResponseBody> post(@FieldMap Map<String,String> map);

猜你喜欢

转载自blog.csdn.net/qwe851023/article/details/83414215
今日推荐