I'm trying to get all the headers for request/response in my logcat. Seems there is no easy way with HttpURLConnection as it is with org.apache.http. According to this blog you can do:
sun.net.www.protocol.http.HttpURLConnection.level = ALL
Seems this was removed from Android implementation for HttpURLConnection. Is there any easy way to sniff requests/responses on logcat?
Thanks
I am not sure it is possible with standard HttpURLConnection on Android. Therefore it is easy to achieve using OkHttp library:
This is something you can easily do yourself: