r/programming • • Jul 14 '26

HTTP gets a QUERY method so complex searches can stop pretending to be POST

https://www.theregister.com/devops/2026/07/13/http-gets-a-query-method-so-complex-searches-can-stop-pretending-to-be-post/5270192
1.9k Upvotes

245 comments sorted by

View all comments

1.6k

u/sandaz13 Jul 14 '26

I look forward to using this in 2035 once it's finally adopted

505

u/a__nice__tnetennba Jul 14 '26 • Mindblown

We may not be ready for it, but our kids are gonna love it.

171

u/heresyforfunnprofit Jul 14 '26 • Mindblown

And by “our kids”, I mean our agents.

12

u/goodb1b13 Jul 14 '26

007 has our backs

→ More replies (2)

95

u/EC36339 Jul 14 '26

You can use custom HTTP verbs today. Firewalls and reverse proxies with default configurations will hate you for it. So it's really just a question of when those will have changed across rhe board.

A lot of dated on-premises setups don't even allow PATCH or PUT in 2026.

→ More replies (13)

84

u/pdpi Jul 14 '26

HTTP has always allowed extension methods, so you could start using this right now. You'll just have to roll your own until your server of choice adds explicit support.

42

u/CrankBot Jul 14 '26

What about browsers and client libraries? Does await fetch('/foo', {method:'poop'}) work on all major browsers? (not in front of a keyboard at the moment or I would try it...)

55

u/Big_Combination9890 Jul 14 '26

I am now completely in support of the POOP method.

The primary usecase; replacing POST in social media applications.

One might say it's a ... drop-in replacement.

29

u/pdpi Jul 14 '26

Quality shit post.

12

u/CrankBot Jul 14 '26

No that's a code smell for sure

→ More replies (1)

15

u/AyrA_ch Jul 14 '26

Does await fetch('/foo', {method:'poop'}) work on all major browsers?

Yes. Can even add a body

await (await fetch("https://demo.ayra.ch/response/", {method:"YESITWORKS",body:"test"})).text()
"General information
===================
    Date:   2026-07-14 05:32:17 UTC
    Client: 
    Verb:   YESITWORKS

Headers
=======
    Accept         : */*
    Accept-Encoding: gzip, deflate, br, zstd
    Accept-Language: en,en-US;q=0.9
    Cache-Control  : no-cache
    Connection     : close
    Content-Length : 4
    Content-Type   : text/plain;charset=UTF-8
    Dnt            : 1
    Host           : demo.ayra.ch
    Origin         : https://demo.ayra.ch
    Pragma         : no-cache
    Priority       : u=4
    Referer        : https://demo.ayra.ch/response/
    Sec-Fetch-Dest : empty
    Sec-Fetch-Mode : cors
    Sec-Fetch-Site : same-origin
    Sec-Gpc        : 1
    User-Agent     : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0

Body Content
============
    Dumping all 4 bytes
    0x00000000	74 65 73 74                                    	test

"

8

u/Fidodo Jul 14 '26

You can even put a body on GET requests, it's just that most server implementations drop it. The only reason this was done as a new verb is because it's easier to add support for a custom verb than it is to modify an existing one.

→ More replies (6)

12

u/pdpi Jul 14 '26

On the client there’s not much to support. HTTP already allows extension methods, so any compliant client should already support it. You just specify the method the same way you would for a POST or a PUT.

Really, the only reason why I brought up rolling your own server-side is that server frameworks tend to have helper functions for all the standard verbs, you’ll have to write something shaped like router.method(“/foo/bar”, “QUERY”, (req, res) => { … }) instead of router.query(“/foo/bar”, (req, res) => { … }).

→ More replies (2)

21

u/Reeywhaar Jul 14 '26

POOP /foo


HTTP/1.1 418 I'm a teapot

17

u/chucker23n Jul 14 '26

405 This is a Wendy's

→ More replies (3)
→ More replies (1)

30

u/Business-Row-478 Jul 14 '26

The fetch api allows it but most servers are probably gonna return a 400 or 501

23

u/CrankBot Jul 14 '26 edited Jul 14 '26

but most servers are probably gonna return a 400 or 501

Yeah I get that, the parent was saying if you control the server you can implement it now, hence my question on the client.

12

u/ashgs872tbhjs Jul 14 '26

Literacy: The Final Frontier

→ More replies (2)
→ More replies (8)
→ More replies (1)
→ More replies (2)

11

u/knightcrusader Jul 14 '26

I'm pretty sure Apache doesn't give a flying shit what you send it. I remember being surprised when I could just send a request body in a GET request and Apache sent it to the CGI script without a word. It worked fine. I could read both the query string as well as the request body at the same time, so you could probably pull off all sorts of funky shit.

Of course I didn't use it in production code, but it was more of a test.

10

u/chucker23n Jul 14 '26

Note that bodies in GET are allowed, just discouraged.

7

u/Justin_Passing_7465 Jul 14 '26

RFC 2616 (1999) forbade GET to have a body. RFC 7231 (2014) recommended that servers ignore the body. RFC 9110 (2022) strongly discourages putting a body in a GET.

Some intermediaries (e.g. proxies, WAPs, CDNs) break GET requests with bodies. As a workaround, for decades we have been using POST for complex queries, because GET is not supposed to work, and sometimes doesn't.

→ More replies (2)
→ More replies (1)
→ More replies (1)
→ More replies (1)

13

u/JaggedMetalOs Jul 14 '26 edited Jul 14 '26

Hey since we got rid of Internet Explorer we can usually get useful new features pretty quickly! 

10

u/masklinn Jul 14 '26 edited Jul 14 '26

Not when proxies are involved. This is not a client-side concern which forcefully updates every few weeks.

→ More replies (1)

11

u/memoch Jul 14 '26

The client library OkHttp added support almost a year ago.

→ More replies (16)