惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
The Cloudflare Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
L
LangChain Blog
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
I
InfoQ
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
H
Help Net Security
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Lobsters

CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] akashina.tngl.sh/jjc Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data
RFC 10008: The HTTP QUERY Method
Blain Smith · 2026-06-18 · via Lobsters

RFC 10008 was published on June 15, 2026 and defines a new HTTP method: QUERY. It fills a gap that has existed for as long as I have been building APIs. You have data to send to the server in order to describe what you want back, but GET does not have a body and POST is neither safe nor idempotent. QUERY gives you a method that accepts a request body while remaining safe, idempotent, and cacheable.

If you have ever built an SDK that talks to a JSON-RPC API you have felt this pain. JSON-RPC by design sends a JSON payload describing the method and parameters. That payload has to go in the body, which means POST, which means caches and intermediaries treat every request as a state-changing operation. Retry logic gets complicated. CDN caching is off the table. You end up building your own application-level caching because HTTP's built-in mechanisms cannot help you.

QUERY changes that. The semantics are simple: send a body, get a response, and the whole exchange is treated like a GET from the perspective of caching and safety.

In Go

Go's net/http already lets you use arbitrary method strings with http.NewRequest, so SDK code using QUERY looks about like you would expect:

body, _ := json.Marshal(map[string]any{
	"jsonrpc": "2.0",
	"method":  "getScore",
	"params":  []any{"0xABC123", "latest"},
	"id":      1,
})

req, _ := http.NewRequestWithContext(ctx, "QUERY", "https://rpc.example.com", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")

resp, _ := http.DefaultClient.Do(req)

No new dependencies needed. The standard library handles it because HTTP methods are just strings.

In Rust

With reqwest you can use reqwest::Method to define a custom method:

use reqwest::{Client, Method};

let client = Client::new();
let query_method = Method::from_bytes(b"QUERY").unwrap();

let resp = client
    .request(query_method, "https://rpc.example.com")
    .header("Content-Type", "application/json")
    .body(r#"{"jsonrpc":"2.0","method":"getScore","params":["0xABC123","latest"],"id":1}"#)
    .send()
    .await?;

Caching

The part I have been waiting for is in Section 2.7. The response to a QUERY is cacheable and the cache key must incorporate the request body and its metadata. This means a reverse proxy or CDN can look at the Content-Type and the body bytes together and serve a cached response for identical queries. Caches can also normalize the body (reorder JSON keys, strip insignificant whitespace) to improve hit rates.

For RPC-style APIs where every request is semantically a read operation but structurally a POST, this is a meaningful improvement. You get HTTP-native caching without building a bespoke layer on top.

The RFC is short and readable. Worth 20 minutes if you build or consume HTTP APIs.