cashapp / misk

Microservice Kontainer

Home Page:https://cashapp.github.io/misk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow requests with a DELETE verb to carry a body

severb opened this issue · comments

I'm getting this error when trying to bind a DELETE verb to a handler that expects a body: cannot claim request body of DELETE.

The error seems to originate from here. I propose that we remove this restriction as it's absolutely fine for DELETE requests to carry a body.

There was some discussion about this here: #1369 (comment)

In summary: the body of a DELETE request may (or should!) be ignored by clients and servers, so we fail instead to remove ambiguity. This SO question has mixed opinions on it too: https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request

I'm not aware of any HTTP standard that disallows DELETE bodies. But you're right, I don't think this is important enough to warrant a change.