Closed hrodic closed 4 years ago
There's no real interest in changing this per https://github.com/whatwg/fetch/issues/551 and it would also be a lot of work to do in a safe way. It'd be best if such APIs also accepted a method such as SEARCH
or some such.
Regarding to the send() method
This, obviously is implemented in browser engines, like chromium. https://chromium.googlesource.com/chromium/blink.git/+/99b8c9800ac123eddc3e199088d22569c5294b22/Source/core/xml/XMLHttpRequest.cpp#600
The Hypertext Transfer Protocol (HTTP/1.1) RFC https://tools.ietf.org/html/rfc7231#section-4.3.2
states that
So, You cannot rely on sending payload in GET request being processed by "some" servers. This, does not mean that we should forbid having this use case, or being able to send payload in GET http requests.
My question is, due the fact that some API implementations have huge benefits of using structured payload data (xml, json, or others...) when retrieving resources, like we do with REST APIs, what is the reason of putting efforts on removing payloads when GET http requests? Because, by default, it will just work, but there has been work on top of the default to avoid this behaviour and scenarios. There is any reasoning and strong technical explanation to forbid and avoid at all costs to send payloads with GET verbs in all cases?
Could it be possible to allow it, just in case some implementors need it (like we do?).
Thank you!