Reputation: 864
I am using Retrofit to hit an api. I need to get both Json and header response. So my interface method is like this. So in Response type Object I get response header from response.getHeaders()
. But when I try to get the json response from response.getBody()
, I don't get a proper response. I need help in fetching and parsing the json response from the Response object :-(
@GET("/api/hello/categories")
retrofit.client.Response getData();
Upvotes: 2
Views: 1521