Code example for HttpRequestBase

Methods: getMethodgetURI

	 *            HttpRequest to execute 
	 * @return A HttpResponse instance 
	 * @throws IOException IOException 
	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);
Stop searching for code, let great code find you!  Add Codota to your java IDE