Nagendra,
Be assured the intention is noble.
All I want to do is see my own requests being sent to a HTTPS server. I write the request using the OutputStream of a HttpURLConnection. But what I write into the OutputStream is only a part of the request that is finally sent to the server, because HttpURLConnection prefixes it with the HTTP header etc. That's the part I am more interested in, in order to interpret the server response that I receive.
Is there a way to somehow get the ServerSocket that HttpURLConnection is using, or some such stunt? The task is to be able to read your own HTTPS request stream that you send to the server. Gurus....