The HTTP QUERY method was standardized in
RFC 10008 (June 2026): a safe,
idempotent request method that carries content in the request body (the
standardized replacement for the "use POST for a read-only query with a large
body" workaround in GraphQL / REST search APIs).
I'd like Flask to treat QUERY as a first-class method like the others:
- a
query() route shortcut on Scaffold (inherited by Flask and
Blueprint), mirroring get/post/put/delete/patch;
MethodView dispatch of QUERY to a query handler (add "query" to
views.http_method_funcs).
Is this solvable without changes to Flask? Partly — @app.route("/x", methods=["QUERY"]) already works today, since Flask doesn't restrict method
names and Werkzeug parses the body. What's missing is the ergonomic shortcut and
MethodView dispatch that every other common method already has, so this is a
consistency/ergonomics gap rather than new capability — the same rationale behind
the existing get/post/... shortcuts. Use case: safe, idempotent search
endpoints that need a request body too large or complex for the URL.
The HTTP
QUERYmethod was standardized inRFC 10008 (June 2026): a safe,
idempotent request method that carries content in the request body (the
standardized replacement for the "use POST for a read-only query with a large
body" workaround in GraphQL / REST search APIs).
I'd like Flask to treat
QUERYas a first-class method like the others:query()route shortcut onScaffold(inherited byFlaskandBlueprint), mirroringget/post/put/delete/patch;MethodViewdispatch ofQUERYto aqueryhandler (add"query"toviews.http_method_funcs).Is this solvable without changes to Flask? Partly —
@app.route("/x", methods=["QUERY"])already works today, since Flask doesn't restrict methodnames and Werkzeug parses the body. What's missing is the ergonomic shortcut and
MethodViewdispatch that every other common method already has, so this is aconsistency/ergonomics gap rather than new capability — the same rationale behind
the existing
get/post/... shortcuts. Use case: safe, idempotent searchendpoints that need a request body too large or complex for the URL.