Code example for BasicHttpParams

Methods: setParameter

0
	 */ 
	private HttpResponse execute(HttpRequestBase request) throws IOException {
		Log.d(LOG_TAG, request.getMethod() + " " + request.getURI());
 
		// Initialize HTTP parameters 
		final HttpParams httpParameters = new BasicHttpParams();
 
		// Set timeout values 
		HttpConnectionParams.setConnectionTimeout(httpParameters, CONNECTION_TIMEOUT);
		HttpConnectionParams.setSoTimeout(httpParameters, SOCKET_TIMEOUT);
 
		// Set useragent 
		httpParameters.setParameter(CoreProtocolPNames.USER_AGENT, USER_AGENT);
 
		// Initialize HttpClient with previously defined parameters 
		final HttpClient client = new DefaultHttpClient(httpParameters);
 
		return client.execute(request);
	} 
}