Code example for DefaultHttpClient

Methods: getParams

0
		HttpProtocolParams.setUseExpectContinue(params, false);
		HttpClientParams.setCookiePolicy(params, CookiePolicy.BROWSER_COMPATIBILITY);
		HttpConnectionParams.setConnectionTimeout(params, wifi ? timeout : (timeout * 3));
		HttpConnectionParams.setSoTimeout(params, wifi ? timeout : (timeout * 3));
		ClientConnectionManager ccm = new ThreadSafeClientConnManager(params, schemeRegistry);
		DefaultHttpClient client = new DefaultHttpClient(ccm, params);
		 
		if(!wifi && hasProxy()) {
			HttpHost proxy = getProxy();
			if(proxy != null)
				client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
		} 
 
		return client;
	} 
	 
	/// create http request 
	static HttpUriRequest createHttpRequest(String url, int method) {
		Method m = Method.values()[method];
		switch(m) {
			case GET: