Code example for HttpParams

Methods: setParameter

0
 
	public BaseHttpClient(Context context, String domain) {
        this.domain = domain;
		this.context = context;
		httpParameters = new BasicHttpParams();
		httpParameters.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 1);
		httpParameters.setParameter(
				ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,
				new ConnPerRouteBean(1));
 
		httpParameters.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE,
				false); 
		HttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);
		HttpProtocolParams.setContentCharset(httpParameters, "utf8");
 
		// Set the timeout in milliseconds until a connection is established. 
		HttpConnectionParams.setConnectionTimeout(httpParameters,
				timeoutConnection);
 
		// in milliseconds which is the timeout for waiting for data. 
Stop searching for code, let great code find you!  Add Codota to your java IDE