Search code examples
androidapirestretrofit2

Problems with retrofit2 calls format


I am experiencing some issues with a retrofit call to the backend. I explain you the situation:

I have developed the API call in the postman by the next way:

enter image description here

In the Android studio I try to do the API call by the next way:

 @GET("restricted/GaiakIkuskatzea")
    Call<Gaiak> getGaiak(@Query("grupo") String grupo);

But what I get is a empty object of JSON type, as I got if in the postman I make an api call without the param I showed before, and with the parameter specifyed in the body:

enter image description here

Does any of you know why I am having porblems with the Studio?

Thanks!


Solution

  • The final answer was watching the name that recived the data that you were receiving, in my case I put http and observed the mistake.