title: How to - Spring IoC and HttpClient 4.3.1 CloseableHttpClient?
body: <p>I'd like to have Spring IoC configure a <code>CloseableHttpClient</code> object and inject it into my class so that customization of its configuration can be done via XML.</p>
  
  <p>From what I can see, <code>HttpClient</code> seems to resist this pattern quite forcibly. They want you to do things like</p>
  
  <pre><code>CloseableHttpClient chc =
      HttpClients.custom().set&lt;thing that should be a property&gt;().build();
  </code></pre>
  
  <p>Ick.</p>
  
  <p>Is there not some mechanism for making a singleton <code>CloseableHttpClient</code> bean that I can then use?</p>