Hi Maximilian,
The list of connection parameters can be found here:
http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e391
To use one of these settings, you need something like:
HttpParams params = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(params,
_connectionTimeout);
ClientConnectionManager cm = new
ThreadSafeClientConnManager(params, schemeRegistry);
_httpClient = new DefaultHttpClient(cm, params);
See the init() method in the SimpleHttpFetcher.java class of the Bixo
project:
http://github.com/emi/bixo/blob/master/src/main/java/bixo/fetcher/http/SimpleHttpFetcher.java
-- Ken
On Oct 14, 2009, at 11:52am, Maximilian Eberl wrote:
Hi all!
The method httpclient.setConnectionTimeout() in 3.x
does no longer exist in 4.0
Where do I set the timeout now?
I googled a lot, searched the list archive
and walked through the tutorial but could
not find it.
Do I have to rewrite my code to nio-based
NHttpClient just to have the chance to set
a connection timeout??
(The default timeout is much too long.)
Thank You in advance!
Maximilian
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--------------------------
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-210-6378