How to use the Android Apache HttpDelete class with parameter

Viewed 2651

I need to send an ID to the server and have the server to delete one record in a DB. I want to use the HttpDelete Apache Android SDK integrated class but I cannot figure out how to use it and how to pass parameters to the server. With the POST request I use .setEntity method on the HttpPost class. But in HttpDelete there's no .setEntity method.

What I have so far achieved is:

 HttpClient httpclient = new DefaultHttpClient();
 HttpDelete httpdelete = new HttpDelete(url);
 httpdelete.setHeader(HTTP.CONTENT_TYPE, "text/xml");
 response = httpclient.execute(httpdelete);
1 Answers
Related