Retrofit error URL query string must not have replace block

前端 未结 4 539
北恋
北恋 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:30

    Don't put your values directly in the path, but prefer in the method signature. Not completely sure, but try something like this :

    @GET("/users?filters[0][operator]=equals")
    UserDto retrieveUsersByFilters(@Path("filters[0][field]") String nameFilter, @Path("filters[0][value]") String value);
    

提交回复
热议问题