title: Java - DefaultHttpClient and "Host" header [Apache HttpComponent]
body: <p>I'm submitting multiple HTTP Requests via a DefaultHttpClient. The problem is that the "Host" header is never set in the request. For example by executing the following GET request:</p>
  
  <pre><code>HttpUriRequest request = new HttpGet("http://www.myapp.com");
  org.apache.http.client.HttpClient client = new DefaultHttpClient();
  HttpResponse httpResponse = client.execute(request);
  </code></pre>
  
  <p>The generated request object doesn't set the mandatory "Host" header with the value:</p>
  
  <pre><code>Host: myapp.com
  </code></pre>
  
  <p>Any tips?</p>