-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Rule proposal: force method: "POST"
on fetch calls with body
#1989
Comments
Another thing related to |
Should not enforce |
No HTTP method strictly forbids a body, and there are definitely examples of APIs that accept a body on GET, like elasticsearch. |
The fetch spec forbid it,
|
Interesting, didn't know that. I guess some implemententations may opt to not implement that step, but for a general case, it seems good to have the rule for it then. I do forsee that the spec may change in the future, similar to how initially a body on DELETE was forbidden by older RFCs, but newer specs now say it MAY have a body 😉. At least OpenAPI reverted their previous policy and they do allow body on GET,HEAD and DELETE. |
|
👍 |
Description
I sometimes forget to add
method: 'POST'
to fetch callsFail
Pass
Additional Info
No response
The text was updated successfully, but these errors were encountered: