Code example for HttpParams

Methods: setParameter

0
		HttpConnectionParams.setConnectionTimeout(params, 30 * 1000);
		HttpConnectionParams.setSoTimeout(params, 30 * 1000);
		HttpConnectionParams.setSocketBufferSize(params, 8192);
 
		// set the connection manager factory 
		params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY,
				new ClientConnectionManagerFactory() {
					public ClientConnectionManager newInstance(
							HttpParams params, SchemeRegistry schemeRegistry) {
						return new ThreadSafeClientConnManager(params,
								schemeRegistry);
					} 
				}); 
 
		// set the redirect, default is true 
		HttpClientParams.setRedirecting(params, true);
 
		// set the client verion 
		HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
		// set user-agent 
		HttpProtocolParams.setUserAgent(params, "eoeWIKI_Android/0.9");
		// set the charset 
		HttpProtocolParams.setHttpElementCharset(params, HTTP.UTF_8);
		HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
		// set not activate Expect:100-Continue 
		HttpProtocolParams.setUseExpectContinue(params, false);
 
		// set the version of the cookie 
		params.setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2965);
	} 
 
	/** 
	 * get the response from the url 
	 *