Example usage for org.apache.http.protocol SyncBasicHttpContext SyncBasicHttpContext

List of usage examples for org.apache.http.protocol SyncBasicHttpContext SyncBasicHttpContext

Introduction

In this page you can find the example usage for org.apache.http.protocol SyncBasicHttpContext SyncBasicHttpContext.

Prototype

public SyncBasicHttpContext(HttpContext httpContext) 

Source Link

Usage

From source file:com.enjoy.nerd.http.AsyncHttpClient.java

/**
 * Perform a HTTP DELETE request.//w w  w . j ava  2 s . c  o  m
 *
 * @param context         the Android Context which initiated the request.
 * @param url             the URL to send the request to.
 * @param headers         set one-time headers for this request
 * @param params          additional DELETE parameters or files to send along with request
 * @param responseHandler the response handler instance that should handle the response.
 * @return RequestHandle of future request process
 */
public RequestHandle delete(Context context, String url, Header[] headers, RequestParams params,
        ResponseHandlerInterface responseHandler) {
    HttpDelete httpDelete = new HttpDelete(getUrlWithQueryString(isUrlEncodingEnabled, url, params));
    if (headers != null)
        httpDelete.setHeaders(headers);
    SyncBasicHttpContext httpContext = new SyncBasicHttpContext(mBasicHttpContext);
    return sendRequest(httpClient, httpContext, httpDelete, null, responseHandler, context);
}