Skip to content

The HTTP QUERY Method (RFC 10008) #692

Description

@jeswr

Specification: The HTTP QUERY Method — RFC 10008 (IETF HTTP WG, Proposed Standard; IANA-registered, safe + idempotent): https://www.rfc-editor.org/rfc/rfc10008.html

QUERY is a safe, idempotent, cacheable HTTP method carrying a request body whose content defines the query — the missing middle between GET (no body, URL-length-bound) and POST-as-read (unsafe, uncacheable).

Web-facing surface:

  • Scripted requests already workfetch(url, { method: 'QUERY', body }) and XHR send QUERY (it is neither a Fetch forbidden nor a normalized method).
  • Declarative forms<form method="query"> falls back to GET today, dropping the body (Support QUERY method in form submissions whatwg/html#12594).
  • HTTP cache — RFC 10008 §2.7 makes a QUERY response cacheable with a key that incorporates the request content. We tested current Chrome and Firefox: both cache GET, but neither caches a repeated identical QUERY — so this is unimplemented, not already solved.
  • Accept-Query — a response header advertising supported query media types (§3).
  • CORS — QUERY is intentionally not CORS-safelisted, so a cross-origin QUERY requires a preflight (by design; no safelist change requested).

Emerging implementations: Node.js undici (nodejs/undici#5459, with a body-aware cache key), Eclipse Jetty (jetty/jetty.project#15316), Apache Tomcat (apache/tomcat#1026); and the W3C Linked Web Storage protocol is adopting QUERY for its search / type-index (w3c/lws-protocol#179).

We would value a WebKit position, and any concerns (e.g. on the §2.7 cache-key model), to guide the WHATWG Fetch/HTML work and signal implementer interest. Not requesting an immediate ship.


Companion requests: mozilla/standards-positions#1430 (Mozilla position) and whatwg/fetch#1938 (Fetch integration).

Part of a broader RFC 10008 adoption effort: https://github.com/jeswr/http-query-adoption

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidNot an actionable request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions