Live data from Hacker News

The new HTTP QUERY method explained

kreya.app

31–40 of 179 posts

Re: The new HTTP QUERY method explained

#31
post #10

> using HTTP GET with a request body is a bad idea, as for example users behind a corporate firewall or a different browser may be unable to use your website. So is using QUERY requests for quite some time from now.

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.

Re: The new HTTP QUERY method explained

#33
post #25
post #10

> using HTTP GET with a request body is a bad idea, as for example users behind a corporate firewall or a different browser may be unable to use your website. So is using QUERY requests for quite some time from now.

405 Method Not Allowed is trivial to fall back to POST. How do you know the GET request behaved incorrectly?

That's assuming the corporate proxy is well-behaved.

Re: The new HTTP QUERY method explained

#34
Body is already optional with GET. Proxies aren't supposed to touch it or assign meaning to it; it's between the client and the end server.

A whole new method whose semantics don't really fit with the others is.. An odd way forward.

Re: The new HTTP QUERY method explained

#35
post #34

Body is already optional with GET. Proxies aren't supposed to touch it or assign meaning to it; it's between the client and the end server. A whole new method whose semantics don't really fit with the others is.. An odd way forward.

Yeah I always disliked that there's this idea that you can't put a body on a GET request. Iirc openapi generators goes out of its way to not support that which has lead to me writing a small rant into an API specification before to explain why the get_xyz uses POST...

Re: The new HTTP QUERY method explained

#36
post #34

Body is already optional with GET. Proxies aren't supposed to touch it or assign meaning to it; it's between the client and the end server. A whole new method whose semantics don't really fit with the others is.. An odd way forward.

Proxies are allowed to drop bodies of HTTP GET requests.

RFC 9110 states:

> [..] content received in a GET request has no generally defined semantics, cannot alter the meaning or target of the request [..]

> A client SHOULD NOT generate content in a GET request [..]

Re: The new HTTP QUERY method explained

#37
"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

Re: The new HTTP QUERY method explained

#39
post #10

> using HTTP GET with a request body is a bad idea, as for example users behind a corporate firewall or a different browser may be unable to use your website. So is using QUERY requests for quite some time from now.

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

The difference is the method. Query you're saying I can use body. GET you should never use body.

Re: The new HTTP QUERY method explained

#40
post #34

Body is already optional with GET. Proxies aren't supposed to touch it or assign meaning to it; it's between the client and the end server. A whole new method whose semantics don't really fit with the others is.. An odd way forward.

semantics become extremely relevant when "proxies" start caching.
Post reply on HN