I want to get the complete traffic sent by a HTTP-request in the client itself.
Beginning from the “POST” to the last byte.
Is there a way to do so? Some sort of interceptor?
Not only logging in a file, but get it in the app.
HttpURLConnection http = (HttpURLConnection) new URL ("http://localhost/test").openConnection ();
http.setRequestMethod ("POST");
http.setDoOutput (true);
http.connect ();
OutputStream os = http.getOutputStream ();
os.write ("test".getBytes ());
InputStream is = http.getInputStream ();
byte [] resp = is.readAllBytes ();