jw
06/07/2018, 7:26 PMCall
is a representation of the pending request and its execution mechanism (which can either be synchronous or asynchronous). ResponseBody
is the body type, which in this case is a general wrapper around any HTTP response that will allow you to interpret it as bytes or a string or a stream.Hexa
06/07/2018, 7:32 PMResponseBody
to String
like this: @GET("notes/res")
Call<String> getDev()
. Does that mean I wrapped the the whole HTTP response into a String?jw
06/07/2018, 7:34 PMString
. If you have a JSON converter installed it probably handles it in lenient mode. If you truly want a string representation of the HTTP response you should install the 'scalars' converter (separate artifact of Retrofit) before a JSON converterHexa
06/07/2018, 8:48 PMresponse.body.toString()
to get my response body. But doing this sorted it out new String(response.body.bytes())
jw
06/07/2018, 8:49 PMresponse.body.string()
which will honor the charset defined in the content type (if any)Hexa
06/07/2018, 8:52 PMjw
06/07/2018, 8:53 PM