I've done many integrations so far but none of them required sending an HTTP request with the 'DELETE' method. And today, surprise - HTTP method DELETE doesn't support output appears in my log when I try to make this call.

I couldn't find any related questions/answers on this error apart from this.

The code is simple:

Http h = new Http ();

httpRequest = new HttpRequest ();


The documentation says that the DELETE method is supported too, though there isn't any additional information on this.

Is there a different way of implementing this method or is there something obvious that I'm missing here?

  • any good answer for this? I also have this problem when delete a record to other server.
    – rpm07
    Feb 12, 2015 at 6:06
  • @robertpeter07 As you can see from the answers, you are not allowed to set the body in a delete request. Feb 12, 2015 at 23:32

2 Answers 2


I'd suggest you need to avoid the call to setBody() when making a DELETE call

I doubt DELETE permits an http body of any size.


Since I had the code in a static method, I was setting the body to whatever comes in the parameter.

If you ever get this problem, avoid setting the body:

if (String.isNotBlank(body))

Worked like a charm!

  • This doesn't seem clear to me.
    – rpm07
    Feb 12, 2015 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.