Code example for HttpDelete

0
    /** 
     * Perform a HTTP DELETE request. 
     * @param context the Android Context which initiated the request. 
     * @param url the URL to send the request to. 
     * @param responseHandler the response handler instance that should handle the response. 
     */ 
    public void delete(Context context, String url, AsyncHttpResponseHandler responseHandler) {
        final HttpDelete delete = new HttpDelete(url);
        sendRequest(httpClient, httpContext, delete, null, responseHandler, context);
    } 
     
    /** 
     * 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);