To print the full response in json:
Log.w("2.0 getFeed > Full json res wrapped in gson => ",new Gson().toJson(response));
If you’d like to have pretty print feature, use:
Log.w("2.0 getFeed > Full json res wrapped in pretty printed gson => ",new GsonBuilder().setPrettyPrinting().create().toJson(response));
Note that this prints the deserialized data (not raw response as returned from server). To get the raw response, you may use one of these:
- Use
HttpLoggingInterceptor
see: https://stackoverflow.com/a/33256827/2267723 or have your own version of interceptor - Use http debugging tools such
Stetho
. see: http://facebook.github.io/stetho/ orCharles Web Debugging Proxy
. see: https://www.charlesproxy.com