Code example for BasicHttpParams

Methods: setParameter

0
	} 
	 
	public static HttpClient createHttpClient()
	{ 
		// Set your params (stopping the redirect to read the headers) 
		HttpParams params = new BasicHttpParams();
		params.setParameter("http.connection-manager.timeout", (long)20000);
		params.setParameter("http.socket.timeout",(int)20000);
		params.setParameter("http.connection.timeout",(int)20000);
		HttpClientParams.setRedirecting(params, true);
		 
		HttpClient newHttpclient = new DefaultHttpClient(params);
		 
		return newHttpclient;
	} 
}