title: How to read full response from HttpURLConnection?
body: <p>I make some proxy server in andorid which modify http headers, it works ok, but I have to forward full response to 'top layer'.<br>
  How I can read whole response (all headers, content, everything) from HttpURLConnection?</p>
  
  <pre><code>HttpURLConnection httpURLConnection;
  URL url = new URL(ADDRESS);
  httpURLConnection = (HttpURLConnection) url.openConnection();
  // add headers, write output stream, flush
  if (httpURLConnection.getResponseCode() == HttpsURLConnection.HTTP_OK)
  {
      Map&lt;String, List&lt;String&gt;&gt; map = httpURLConnection.getHeaderFields();
      System.out.println("Printing Response Header...\n");
  
      for (Map.Entry&lt;String, List&lt;String&gt;&gt; entry : map.entrySet())
      {
          System.out.println("Key : " + entry.getKey() + " ,Value : " + entry.getValue());
      }
  
      return new DataInputStream(httpURLConnection.getInputStream());
  }
  </code></pre>
  
  <p>In getInputStream I received only content it is possible to have some stream with whole reposne?</p>