I'm attempting to use an HttpClient DELETE method in order to delete an item from a list.I want to send the relevant item_id using request body.I am using the following way in order to send the data.
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient = HttpUtils.getNewHttpClient();
HttpDelete httpPostRequest = new HttpDelete(URL);
**httpPostRequest.setHeader("item_id",id);**
httpPostRequest.addHeader("Authorization", getB64Auth(username,password));
httpPostRequest.setHeader("Accept", "application/json");
httpPostRequest.setHeader("Content-type", "application/json");
httpPostRequest.setHeader("Accept-Encoding", "gzip");
But i am unable to delete the item into the server database. How to user Request body in HttpDelete?