HTTPQUERY

Learn, test, and verify HTTP — methods (including the new QUERY), status codes, and live requests

中文
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.

/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:

CapabilityGET · URLGET · bodyPOSTQUERY
Request bodynoneundefined · avoidJSONJSON
Safe (no side effects)
Idempotent
Cacheable response~unreliable · undefined~no by default · needs explicitvia Content-Location
Filters kept out of the URL
Immune to URL length limits~2KB cap
Standardized & supported~new RFC · adoption early

Keep exploring