hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <michates...@gmail.com>
Subject some detailed migration questions...
Date Wed, 08 Jul 2009 16:18:02 GMT
I am new to HTTPComponents Client but have been using HttpClient 3.1 very
extensively... So I am facing some migration work.

1. How do I measure the time it took to get a response in a multithreaded
scenario with a limited size of max total connections?

In 3.1 I had to hack this into a custom ProtocolSocketFactory. When the
socket is created I am rembering the time in a thread local scope.

Is that still the way to go?

2. I want to set a different user agent per request

In 3.1 I could set HostParams when executing the method. How does it work

3. Setting a proxy per request

httpClient.execute(proxyHost, httpget, responseHandler);


4. Disabling redirects

params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false);


5. Enabling my own retry handler (which I just need because of verbose

((DefaultHttpClient) this.httpClient).setHttpRequestRetryHandler(XXX);


6. When using the ThreadSafeClientConnManager how can I monitor the number
of threads used or threads waiting?

I guess the ThreadSafeClientConnManager is the replacement of the

Help appreciated...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message