okhttp-basicparamsinterceptor icon indicating copy to clipboard operation
okhttp-basicparamsinterceptor copied to clipboard

当post请求参数为空时,公共参数不起作用

Open shenyunhuan opened this issue 7 years ago • 2 comments

@POST("finance/getCoinPrice.do") Observable<BaseEntity<CoinPriceResult>> getCoinPrice();

我的解决办法是加个假参数 @FormUrlEncoded @POST("finance/getCoinPrice.do") Observable<BaseEntity<CoinPriceResult>> getCoinPrice(@Field("aaa") int aaa); 请教这种请求该怎么写?

shenyunhuan avatar Jul 29 '17 08:07 shenyunhuan

请问你解决了吗?我的也是这种情况 POST请求参数为空的时候有问题

MrsLi avatar Aug 29 '17 09:08 MrsLi

再加个判断就可以解决,因为这种情况不属于FormBody和MultiparBody.

adojayfan avatar May 17 '18 19:05 adojayfan