- From: Jesse Wright <notifications@github.com>
- Date: Tue, 30 Jun 2026 13:28:59 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/1938@github.com>
jeswr created an issue (whatwg/fetch#1938)
RFC 10008 defines QUERY: a safe, idempotent, cacheable method carrying a request body whose content defines the query. Scripted `fetch(url, { method: 'QUERY', body })` already works — QUERY is neither a forbidden method nor normalized. A few Fetch integration points seem worth settling, and I'd like to gauge implementer interest:
1. **Method normalization.** "Normalize a method" uppercases only `DELETE`, `GET`, `HEAD`, `OPTIONS`, `POST`, and `PUT`, so `fetch(url, { method: 'query' })` is sent as lowercase `query`, while the IANA-registered name is `QUERY`. Should `QUERY` be added to "normalize a method"?
2. **CORS.** QUERY is not CORS-safelisted, so a cross-origin QUERY triggers a preflight. RFC 10008 §4 expects this — just confirming it is the intended outcome (no safelist change sought).
3. **Caching.** RFC 10008 §2.7 makes a QUERY response cacheable with a cache key that incorporates the request content. Fetch's HTTP-cache model keys on the URL; should Fetch reflect body-keyed QUERY caching, or leave it to the HTTP cache layer? Empirically, current Chrome and Firefox both cache GET but **neither caches a repeated identical QUERY**, so there is no QUERY caching to rely on today.
This pairs with whatwg/html#12594 (declarative `<form method="query">`).
Implementations / interest so far: Node.js **undici** (nodejs/undici#5459; ships a body-aware cache key as a reference), **Eclipse Jetty** (jetty/jetty.project#15316), **Apache Tomcat** (apache/tomcat#1026); the W3C Linked Web Storage protocol is adopting QUERY (w3c/lws-protocol#179). Mainly seeking direction on whether and how Fetch should account for these, and which engines would be interested in implementing.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1938
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/issues/1938@github.com>
Received on Tuesday, 30 June 2026 20:29:03 UTC