On 12/03/2010 14:56, "ext Ken Krugler" <[email protected]> wrote:

When you create the DefaultHttpClient, you can specify an HttpParams
parameter that contains configuration information, including various
timeout values.

See 
http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e391

And also 
http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/params/HttpConnectionParams.html

A typical snippet looks like:

             HttpParams params = new BasicHttpParams();
             ....
             HttpConnectionParams.setSoTimeout(params, _socketTimeout);
             HttpConnectionParams.setConnectionTimeout(params,
_connectionTimeout);
             ....
             ThreadSafeClientConnManager cm = new
ThreadSafeClientConnManager(params, schemeRegistry);
             _httpClient = new DefaultHttpClient(cm, params);


Thanks for your reply. I wonder one this though, will the default params in 
DefaultHttpClient be overwritten by params or are they added?

Regards,
Johan

Reply via email to