Code example for BasicHttpParams

Methods: setParameter

0
			schemeRegistry.register(new Scheme("https", sf, 443));
 
			ClientConnectionManager cm = new ClientConnectionManager(connParams, schemeRegistry);
 
			// Set up client params. 
			HttpParams httpParams = new BasicHttpParams();
			 
			String host = Proxy.getDefaultHost();
			int port = Proxy.getDefaultPort();
			if(null != host && port != -1){
				Log.i("hybrid", "host: "+ host + "," + "port: " + port);
				HttpHost httpHost = null;
				httpHost = new HttpHost(host, port);
				httpParams.setParameter(ConnRouteParams.DEFAULT_PROXY, httpHost);
				 
			} 
			HttpConnectionParams.setConnectionTimeout(httpParams, DEFAULT_TIMEOUT_MILLIS);
			HttpConnectionParams.setSoTimeout(httpParams, DEFAULT_TIMEOUT_MILLIS);
			//HttpConnectionParams.setSocketBufferSize(httpParams, 8192 * 2); 
			HttpProtocolParams.setVersion(httpParams, HttpVersion.HTTP_1_1);
			HttpProtocolParams.setContentCharset(httpParams, HTTP.UTF_8);