My client\'s API specifies that to remove an object, a DELETE request must be sent, containing Json header data describing the content. Effectively it\'s the same call as ad
DELETE request is an extended form of GET request, as per the android documentation you cannot write in the body of DELETE request. HttpUrlConnection will throw "unable to write protocol exception".
If you still want to write the parameter in the body, i suggest you to use the OKHttp Library.
OKHttp documentation
If you are intrested to use more simpler library then you can try SimpleHttpAndroid library
One thing to remember here is if you are not writing anything in the body then remove the line
conn.setDoOutput(true);
Thanks, Hopefully it may help.