3 ms·
PUT's can have request bodies, GETs can not.
by eptcyka 3y ago
PUT's can have request bodies, GETs can not.
- thaumasiotes 3y agoIncorrect; GET requests are free to have bodies. See the note here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GE...
- The_Colonel 3y agoIt's still a rather bad idea. An older version of HTTP spec said that GET request body SHOULD be ignored. Proxies implementing that older version of spec could just drop the body ... You might also encounter problems with many tools not supporting it simply because the authors were not aware of it or perhaps considered it useless.
- eptcyka 3y agoAlso see the first row in the table on that page.
- yencabulator 3y agoIf you want a GET-with-body that actually works, use QUERY. The draft is expired, but at least it's just a non-standard method (which is fine!), not actively broken like GET-with-body. https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/ https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-met...