HttpClient - setting a "global" socket timeout, and a separate timeout per request

Posted by synic on Stack Overflow See other posts from Stack Overflow or by synic
Published on 2010-06-09T05:15:24Z Indexed on 2010/06/09 5:22 UTC
Read the original article Hit count: 541

With HttpClient, I am setting the default socket/connection timeout with the following:

HttpParams params = new BasicHttpParams();

HttpConnectionParams.setSoTimeout(params, 30000);
HttpConnectionParams.setConnectionTimeout(params, 30000);

mClient = new DefaultHttpClient(connectionManager, params);

I'm wondering if I can override these values on a per request basis?

© Stack Overflow or respective owner

Related posts about java

Related posts about httpclient