Параметр запроса игнорируется в Retrofit 2.6.5 - PullRequest
0 голосов
/ 27 сентября 2019

Когда я использую @GET:

@GET("GETServicios/{id}")
    Call<List<Servicios>> getServiciosPorCategoria(@Path("id")String id, @Query("IdCategoria") int IdCategoria);

Путь работает, но запрос игнорируется.Этот GET дает мне все "Servicios", но не получает "Servicios" с IdCateogry "16".Что я делаю не так?

КОД в Деятельности:

Retrofit retrofit=new Retrofit.Builder()
                .baseUrl("https://xxxxxxx/xxx/xxxxxxxxx/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();

        ApiRest servicio=retrofit.create(ApiRest.class);
        Call<List<Servicios>> call= servicio.getServiciosPorCategoria("16",16);
        call.enqueue(new Callback<List<Servicios>>() {
            @Override
            public void onResponse(Call<List<Servicios>> call, Response<List<Servicios>> response) {
                serviciosList=response.body();
                adapter=new ServiciosCardWiewAdapter(serviciosList,ReservaRecyclerActivity.this);
                listViewServicios.setAdapter(adapter);

            }

            @Override
            public void onFailure(Call<List<Servicios>> call, Throwable t) {

            }
        });
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...