DefaultHttpClient:
请求超时
httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 60000);
读取超时
httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 60000);
HttpClient
HttpClient httpClient=new DefaultHttpClient();
链接超时
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(60000);
读取超时
httpClient.getHttpConnectionManager().getParams().setSoTimeout(60000)
请求超时
httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 60000);
读取超时
httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 60000);
HttpClient
HttpClient httpClient=new DefaultHttpClient();
链接超时
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(60000);
读取超时
httpClient.getHttpConnectionManager().getParams().setSoTimeout(60000)