Code example for HttpDelete

Methods: setHeaders

     * Perform a HTTP DELETE request. 
     * @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 responseHandler the response handler instance that should handle the response. 
    public void delete(Context context, String url, Header[] headers, AsyncHttpResponseHandler responseHandler) {
        final HttpDelete delete = new HttpDelete(url);
        if(headers != null) delete.setHeaders(headers);
        sendRequest(httpClient, httpContext, delete, null, responseHandler, context);
    // Private stuff 
    protected void sendRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, AsyncHttpResponseHandler responseHandler, Context context) {
        if(contentType != null) {
            uriRequest.addHeader("Content-Type", contentType);
        Future<?> request = threadPool.submit(new AsyncHttpRequest(client, httpContext, uriRequest, responseHandler));