N
N
Nurshat2016-03-03 20:16:49
Java
Nurshat, 2016-03-03 20:16:49

How to get a response from the server in retrofit2 without converting it to an object?

Good evening, I can’t figure out how to get a json response from the server using retrofit without converting this very json into an object, that is, the string itself that came from the server is needed. Most likely the solution is very simple, but I can’t finish it, I will be glad for any help)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lomikman, 2016-03-04
@lomikman

@GET("/someurl/")
Call<JsonObject> getSomething();

B
belozerow, 2016-03-03
@belozerow

@GET("/someurl/")
Call<ResponseBody> getSomething();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question