title: Configuring HttpClient for usage as Restlet client
body: <p>I'm stuck configuring Restlet for my client-side code. I'm using Restlet 2 and HttpClient 4. I added the extension jar and the HttpClient jars to the  build path and it seems to work. </p>
  
  <p>However, I don't know how to configure it in detail. I don't create any client manually, instead I use <code>ClientResource</code>s for interactions, which is the only part where I use Restlet directly. The concrete instantiation of clients seems to be hidden in the framework implementation. I found some hints how I might configure clients, but they all were written for Restlet 1.x.</p>
  
  <p>In detail, I want to configure the following parts:</p>
  
  <ul>
  <li>Change the User Agent for client requests. <code>clientResource.getClientInfo().setAgent(…)</code> does not work. </li>
  <li>Increase the number of parallel connections per host.</li>
  <li>Enable persistent connections and pooling per host. Obviously, Restlet so far creates a new connection per <code>ClientResource</code>, which is not really efficient.</li>
  </ul>
  
  <p>Of course, I already had a look at <a href="http://www.restlet.org/documentation/2.0/jse/ext/org/restlet/ext/httpclient/HttpClientHelper.html" rel="noreferrer">HttpClientHelper</a>, but I don't know where and how to add this. Already searched the documentation for that, but no hits.</p>
  
  <p>Thanks for help!</p>