Live data from Hacker News

The new HTTP QUERY method explained

kreya.app

71–80 of 179 posts

Re: The new HTTP QUERY method explained

#71
post #5

What do you think people will make the Query request body? Most everything will use this for JSON but it could be anything so what other interesting things do you think will go in there? Query 1 + 1 and get 2?

We might start using QUERY for the search requests from our web app to our server, if nothing in the stack in between the app and our server side code does not drop the body. A JSON body beats the spaghetti arguments of most filters.

Re: The new HTTP QUERY method explained

#72

Earlier quoted context omitted.

[flagged]

What does "some random third party" have to do with any of it? An SQL server can expose HTTP directly. SQL is not the only query language that exists. SPARQL's standard protocol for sending Queries uses HTTP[1], and yes, of course it allows clients to define the query that it sends over HTTP. HTTP QUERY would be ideal for SPARQL queries. There are also many unprotected SPARQL endpoints that you can use without any au…

This thread is for an RFC that is less than 3 pages and solves no problems that exist. I'm tired of having to pretend like every idea on the internet is a good one.

Re: The new HTTP QUERY method explained

#73

Nice, not having bodies on GET has been a pet peeve of mine for a long time. It would be nice to allow bodies on DELETE as well, but that is less of a problem in most cases.

If you're doing anything complicated enough to need so much data that it'd be better to send the data in a body, it's probably not a DELETE and so POST would be more appropriate anyway.

DELETE is intended to delete one specific object, pointed to by a unique URL, not to delete arbitrary objects matching some criteria.

Re: The new HTTP QUERY method explained

#74
post #68

Slightly off topic Funfact: you can buy a several thousand dollars expensive ssl intercepting proxy appliance which doesn’t support anything beyond http/1.1. Will be fun when those see a whole new http verb, I bet that leads to at least DoS by the track record of that company.

Not mentioning the vendor… means your comment is true for every vendor :)

Re: The new HTTP QUERY method explained

#75

We should have just added optional body support for GET requests. So much simpler...

The only valid argument against HTTP GET with a body is that it has privacy/security risks.

Exist stuff (caches, CDN, etc.) could serve private information because the HTTP GET is cached without checking the request contents. The new standard can avoid this because old stuff does not know about HTTP QUERY.

Re: The new HTTP QUERY method explained

#77
post #68

Slightly off topic Funfact: you can buy a several thousand dollars expensive ssl intercepting proxy appliance which doesn’t support anything beyond http/1.1. Will be fun when those see a whole new http verb, I bet that leads to at least DoS by the track record of that company.

Not mentioning the vendor… means your comment is true for every vendor :)

That would be lancom. Good routers, the rest not so much.

Re: The new HTTP QUERY method explained

#79

>> 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.

The whole connection is encrypted by https, the request body is treated the same as the url, the headers or the response. The only unencrypted parts are the IP addresses/ports and the domain name (if SNI without ECH is used). CDNs already terminate TLS connections so they can cache GET requests.

I think a lot of people don’t know the http/1.x protocol from url (header) to body is a stream of text* separated by \r\n.

* the body may be compressed.

Re: The new HTTP QUERY method explained

#80

"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

I’ve seen a framework strip body content off GET requests, so doing hacky things doesn’t even always work. The QUERY method is a welcome addition

I'd say it's the framework doing the hacky thing. It should be optional. AFAIK, the HTTP spec allows for it, under certain conditions. "A client SHOULD NOT generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported."
Post reply on HN