Live data from Hacker News

The new HTTP QUERY method explained

kreya.app

41–50 of 179 posts

Re: The new HTTP QUERY method explained

#42
post #7

It's interesting to see additions to HTTP methods as it much feels like the existing ones are set in stone. At least for the time that I have been a developer. I'm curious to see how fast the adoption/support for HTTP QUERY will be. I've had my fair share of situations where I wished for something like HTTP QUERY.

zero. Many libs will/can just request method as a string so you can start coding now > I've had my fair share of situations where I wished for something like HTTP QUERY. Using POST instead comes with no drawbacks

I think the article summarizes pretty well what the drawbacks of POST are: unclear idempotency (well it's actually pretty damned clear: they are not cacheable). That complicates caching logic, and that's not just for the application server itself, but any reverse proxies in front of it as well as the user agent itself.

I'm not sure QUERY is a great solution, because in the context of a web application absolutely no one enjoys using a page that does not keep its state on refresh, so that really limits where QUERY makes sense, but if you have a case that is not driven by navigation, great.

Re: The new HTTP QUERY method explained

#43

Earlier quoted context omitted.

Yeah, query seems just GET with a body. No difference in protocol nor behavior

Except compatibility. If you're using classic GET and it's enough for you, you aren't affected.

What is compatible with a QUERY but not with a GET ?

Re: The new HTTP QUERY method explained

#44

"QUERY is just GET" "Using GET with a Body works" Seems like this is going everyone's head. You're not supposed to use GET with a Body, this is a hack, therefore having an explicit method makes sense. Just because it works, doesn't mean its the right way

  > Just because it works, doesn't mean its the right way
Tell that to anybody in the business long enough to decipher someone else's Perl!

Re: The new HTTP QUERY method explained

#45

Earlier quoted context omitted.

Except compatibility. If you're using classic GET and it's enough for you, you aren't affected.

What is compatible with a QUERY but not with a GET ?

Intermediate proxies, caches, CDNs, firewalls, and load balancers.

Re: The new HTTP QUERY method explained

#49
>> QUERY request can be cached

I have a weird feeling. Query body is encrypted by https. So CDN will not be able to cache results. In order to make it work right - whole topology of the internet should be redone. Caching on the backend server will not give any real gains for large scale apps.

Post reply on HN