-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tighten language around GET request bodies #202
Comments
Discussed amongst editors;
|
ietf104: general agreement on SHOULDing against GET bodies e2e arguments cited wrt treating DELETE with the same level of guidance. Julian argues it is more like OPTIONS which could have a body depending on media type. |
One big difference with OPTIONS is that it's a safe method, so even if a body is ignored it doesn't have side-effects, unless a request body with an |
Regarding DELETE, current use cases can be found in the json:api ( documentation.https://jsonapi.org/format/#crud-updating-to-many-relationships ) (see also OAI/OpenAPI-Specification#1801 for more discussion) |
@yxhuvud - I believe the example use of DELETE with body in json:api is very misguided. It uses the payload to identify the actual resources to be deleted, while the resource identified by the request URI is not deleted. |
Given the example from json:api, maybe we need to explain that sendig a payload body can not modify the base semantics of the request: deleting the resource identified by the request URI. Or is this a separate issue? |
If you mean like +1 to that. I also see no reason to change specification of DELETE, other than to be consistent with GET. |
@royfielding: consistency is good, but DELETE is very different from GET. If we change something here, it should lead to consistency with OPTIONS. My proposal is to restrict this change to GET, and consider DELETE separately. |
I have opened a separate ticket for DELETE (#258). Let's just discuss GET over here. |
I'm active on Stack Overflow a lot, and one thing that occasionally pops up is: Can a GET or DELETE request have a request body?
My answer to this currently stands at a score of -1: https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request/54735278#54735278
But I think it's correct.
This is the wording for
DELETE
:Some people interpret 'no defined semantics' as, "I can define the semantics myself". That interpretation is somewhat similar to how someone might look at a
POST
request and argue: the HTTP standard doesn't really say what the effect of aPOST
request is.So English and well, semantics aside... My understanding is that the intent for those paragraphs is so that generic parsers are possible, and a generic parsers don't need to know specifics about the methods to figure out whether to parse the body or not.
However, a real world effect is that:
I think the specification could benefit from stronger wording. I think even a sentence like this would help:
But I would argue that, given that this is creating some interop issues that this is even more preferable:
The text was updated successfully, but these errors were encountered: