Forum Discussion

grayger's avatar
grayger
New Contributor
16 years ago

DELETE method request can't include body

Hi, I am very pleased to use SoapUI.

But, I found the tool can't send a DELETE request including body.
Is there any reason to disable it?
I can't find any clue on it from HTTP spec.

Thanks.

6 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi grayger,


    As far as I know and HTTP specification confirms this: there is no body (i.e. request entity) to be included with a HTTP DELETE method.

    Why would you need body with HTTP DELETE method request?


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla
  • grayger's avatar
    grayger
    New Contributor
    Hi,

    Thanks for your reply, but I can't find any statement about DELETE's body from HTTP spec.

    There was a similar question, and I agree with the answers.
    http://stackoverflow.com/questions/2996 ... te-request

    I need body with DELETE method because additional information of resource that will be deleted is contained in body.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    soapUI uses HttpClient 3.1 for sending HTTP requests which doesn't seem to allow for the adding of a request entity to DeleteMethods.. if you can find a way around this in their API please let us know and we'll try to integrate it..

    sorry for the inconvenience.

    regards!

    /Ole
    eviware.com
  • I was able to do this by using a POST call and adding the X-HTTP-Method-Override header.

    You can set X-HTTP-Method-Override: DELETE which will override you call to change it to the type of request you mention. So with this you can create a POST call with the payload you want and use the header to turn it into a DELETE call.
  • MarianL's avatar
    MarianL
    New Contributor
    Hello,

    I am bothering with same problem. X-HTTP-Method-Override is not solution for soapUI, because I need to implement it on service side.

    For me is soapUI unusable for testing DELETE HTTP request with body.

    @Ole: Is there any chance that it will be implemented in soapUI?

    Thanks

    Marian