HTTPQUERY
English
New method

Meet HTTP QUERY

QUERY is a safe, idempotent method that carries a request body — essentially a “GET with a body”. It lets complex query criteria live in the request body instead of a bloated URL, without misusing POST whose semantics don’t fit querying.

Learn · Test · Verify HTTP, incl. the new QUERY

/api/echo
→ request
QUERY /productsNEWAccept: application/jsonContent-Type: application/json {  "category": "boots",  "inStock": true}
← response
200 OKContent-Location: /products?…Cache-Control: max-age=60 {  "results": 42,  "cacheable": true}

Same search, four ways

The same product search, four ways:

Swipe horizontally to compare all methods. QUERY is shown first.

CapabilityQUERYGET · URLGET · bodyPOST
Request bodyJSONnoneundefined · avoidJSON
Safe (no side effects)✓✓✓✗
Idempotent✓✓✓✗
Cacheable response✓via Content-Location✓~unreliable · undefined~no by default · needs explicit
Filters kept out of the URL✓✗✓✓
Immune to URL length limits✓✗~2KB cap✓✓
Standardized & supported~new RFC · adoption early✓✓✓

Keep exploring