The answer to your server is just a string, not an object. Use Interceptor to see the received answer.
Add an addict dependency
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
and then add it to your custom OkHttp client.
OKHttp client = .... HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(); interceptor.setLevel(HttpLoggingInterceptor.Level.BODY); client.interceptors().add(interceptor); Retrofit retrofit = new Retrofit.Builder() .baseUrl("url") .client(client)
You can check out BASIC , HEADERS and BODY . In your case, you check BODY to see the body you are sending, and which server is sending as the response body.
Florescu CΔtΔlin
source share