Re:Curl is just the hobby
by eptcyka on Monday April 22, 2024 @06:37AM
(#40113011)
PUT's can have request bodies, GETs can not.
[ Parent
| on HN ]
Re:Curl is just the hobby
by thaumasiotes on Monday April 22, 2024 @06:53AM
(#40113093)
Incorrect; GET requests are free to have bodies.
See the note here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GE...
Re:Curl is just the hobby
by The_Colonel on Monday April 22, 2024 @07:09AM
(#40113185)
It'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.
Also see the first row in the table on that page.
Re:Curl is just the hobby
by yencabulator on Monday April 22, 2024 @11:39AM
(#40115418)
If 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-met...