Allow request body in DELETE method#17
Conversation
|
@aivus! @diego1auto, did you guys actually look into the RFC referenced above, or just agreed with OP interpretation? let me:
which effectively means, any proxy-server, WAF, etc. will clear the body for you or simply fail the request, and will be absolutely right. Also, DELETE is deleting whatever is specified in the request, while GET is getting you the same exact thing. it's not even about this PR, the approach from your usecase is just wrong. |
|
Hello @Dropaq Thank you for your feedback. We have thoroughly reviewed the RFC, and our interpretation differs from yours.
The RFC indicates that there is no standardized approach for handling bodies in DELETE requests, and this behaviour is left to the server’s implementation.
Therefore, as a library, our package should not restrict users from including a body in DELETE requests—even if RFC 9110 does not recommend it. This provides users with the flexibility to accommodate various server implementations. |
Even if it is not the recommended approach for REST APIs, the HTTP RFC explicitly allows payloads in DELETE requests, even though their semantics are not defined and may be ignored by some servers.
We need this change because one of the internal service endpoints requires a body with DELETE.
Reference: RFC 9110 - Section 9.3.5 DELETE