Retrofit error URL query string must not have replace block

前端 未结 4 552
北恋
北恋 2021-02-05 04:43

I have this function

      @GET(\"/users?filters[0][field]={param}&filters[0][operator]=equals&filters[0][value]={value}\")
UserDto retrieveUsersByFilte         


        
4条回答
  •  灰色年华
    2021-02-05 05:49

     URL="/api-mobile_prateek2.php?method=getProductById&pid="
    
    
     @GET("/api-mobile_prateek2.php?method=getProductById")
        Call responseproduct(@Query("pid") String pid);
    

    dont put the pid in the @GET,, Retrofit automatically fix the url, using @Query

提交回复
热议问题