List of usage examples for org.apache.http.protocol SyncBasicHttpContext SyncBasicHttpContext
public SyncBasicHttpContext(HttpContext httpContext)
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); }