title: Problem displaying request headers with apache httpclient 4
body: <p>I've been trying to retrieve the headers sent by a HttpMethod, using HttpClient 4, but without any  success...</p>
  
  <p>here is my code : </p>
  
  <pre><code>HttpClient httpClient = new DefaultHttpClient();
  HttpParams httpParams = httpClient.getParams();
  HttpGet httpGet = new HttpGet("http://www.google.fr");
  
  HttpResponse response = httpClient.execute(httpGet);
  
  log.info("*** Request headers ***");
  Header[] requestHeaders = httpGet.getAllHeaders();
  for(Header header : requestHeaders) {
      log.info(header.toString());
  }
  log.info("***********************");
  
  
  log.info("*** reponse ***");
  log.info(response.getStatusLine());
  Header[] headers = response.getAllHeaders();
  for(Header header : headers) {
      log.info(header.toString());
  }
  </code></pre>
  
  <p>but the result is : </p>
  
  <pre><code>00:27:57,368 INFO   - *** Request headers ***
  
  00:27:57,368 INFO   - ***********************
  
  00:27:57,368 INFO   - *** reponse ***
  
  00:27:57,368 INFO   - HTTP/1.1 200 OK
  
  00:27:57,368 INFO   - Date: Sun, 15 Aug 2010 22:28:09 GMT
  
  00:27:57,368 INFO   - Expires: -1
  
  00:27:57,368 INFO   - Cache-Control: private, max-age=0
  
  00:27:57,368 INFO   - Content-Type: text/html; charset=ISO-8859-1
  
  00:27:57,368 INFO   - Set-Cookie: 
  
  [..]
  </code></pre>
  
  <p>Aka the response headers are good, but not the request's. ( Same result if I move the log request headers block before the execute statement ).</p>
  
  <p>(and NO, I dont want to simply see them, so setting the log level to debug isnt acceptable )</p>
  
  <p>Anyone can help ?</p>