bdkjones / CodeKit2

CodeKit 2 Beta
97 stars 4 forks source link

Feature request: Support request payloads for HTTP DELETE #579

Closed ashjmcfox closed 9 years ago

ashjmcfox commented 9 years ago

This relates to issue: HTTP Verbs not supported?

You previously added support for PUT and DELETE when using an external server through CodeKit.

Is it possible to support request payloads for the DELETE verb?

I have an API which requires a boolean to determine if it should perform a normal or soft delete operation.

{
    "softDelete": true
}

Thanks.

bdkjones commented 9 years ago

Does DELETE support a payload? I can't find a reference to it in the spec. If you run this API directly on an Apache server (say, MAMP) does it work correctly?

ashjmcfox commented 9 years ago

If the request is made directly to the server, then it succeeds and works as expected. However, you're right - it's not exactly the best approach to have DELETE payloads. The spec states that payloads are not expressly forbidden, they just have no defined semantics.

"A payload within a DELETE request message has no defined semantics"

I might look into whether the API can be changed to move the payload into the URI as a query parameter.

ashjmcfox commented 9 years ago

Found a workaround and modified the behaviour of the API. I'll close this issue. Thanks.