Example usage for org.apache.http.client HttpClient execute

List of usage examples for org.apache.http.client HttpClient execute

Introduction

In this page you can find the example usage for org.apache.http.client HttpClient execute.

Prototype

<T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler)
        throws IOException, ClientProtocolException;

Source Link

Document

Executes HTTP request to the target using the default context and processes the response using the given response handler.

Usage

From source file:com.squeezeday.marknadskoll.HttpHelper.java

private static String doRequest(HttpUriRequest request, String url, HttpContext context, boolean readResponse)
        throws IOException, HttpException {
    HttpClient httpClient = getClient();

    Log.w("http", url);

    ResponseHandler<String> responseHandler = new BasicResponseHandler();
    String response = httpClient.execute(request, responseHandler, context);

    return response;
}