Support for HTTP QUERY method
Author: zunnuCreated Jul 10, 2026Updated Jul 26, 2026
Labelsenhancement
The IETF recently published RFC 10008, which formally introduces the HTTP QUERY method.
Basically, it fixes the old problem where GET URLs get too long for complex search filters or GraphQL, and using POST breaks idempotency and HTTP-level caching. QUERY is simply a safe and idempotent method that carries a request body.
I suggest we implement native support for this in CakePHP 5.
Proposed approach
It shouldn't require a massive rewrite. The most logical places to update would be:
- Routing: Ensure the router correctly accepts
QUERYas a valid method. We could add a$builder->query()shorthand inCake\Routing\RouteBuilderalongsideget(),post(), etc. - Request Handling:
ServerRequest::is('query')should return true. The body parser needs to processQUERYpayloads exactly as it already does forPOSTorPUTrequests. - HTTP Client: Add a
$client->query()convenience method toCake\Http\Clientso developers can easily make outboundQUERYrequests.
CakePHP Version
5.0 >
Source: cakephp/cakephp