Hacker News new | ask | show | jobs
by NoMoreNicksLeft 1115 days ago
If I send a request body with GET, what modern systems would even have a problem with that? Is there some caching middleware somewhere that I've never heard of or just ignored that will screw it up?

If there was a GET-with-body http verb I'd probably use it at one point or another, but I often wonder where plain GET would start blowing up if I just used it for that.

Honestly, I think rest is a mess, and that everything should just be POST with no values in the url at all.

2 comments

GET with a body is pretty useless because the standard doesn’t allow the body to affect the results. So, proxies, browsers, etc. are free to ignore the body when caching results.
Quick workaround: GET /search?key=$hash(body)
Reminds me Google Maps: GET /search?pb=$protobuf_to_string.
even though most servers support it AFAIK, many clients don't. Many will even silently discard the body when sending a GET request.