Hono Just Added Support for the New HTTP QUERY Method — and I Got to Contribute ❤️
A few weeks ago, the new HTTP method QUERY was standardized, making it necessary for frameworks and tooling to begin adopting it.
One thing I love about Hono is how quickly it evolves. Even before official support existed, Hono already made it possible to work with custom HTTP methods. Thanks to the amazing Hono community, I had the opportunity to contribute to adding first-class support for the new QUERY method.
That was a fun contribution to be a part of!
What is the QUERY method?
We’re all familiar with GET and POST, and while you can technically use either for almost anything, HTTP semantics exist for a reason.
GET
GET is used to retrieve data from a server without changing its state. It should not create, update, or delete resources.
One limitation of GET is that it doesn’t have a request body. Any data sent with the request typically has to be included in the URL as query parameters.
For example:
GET /users?name=John&age=25
This means request data becomes part of the URL, which can be inconvenient for larger or more complex queries.
POST
POST is commonly used to send data that may change the server’s state, such as creating or updating resources.
Unlike GET, it supports a request body:
{
"name": "John",
"age": 25
}
However, using POST purely for data retrieval isn’t always semantically correct since it’s generally associated with state-changing operations.
Enter QUERY
The new QUERY method fills this gap.
It allows clients to retrieve data without modifying server state, just like GET, while also allowing a request body. This means complex filters or search payloads can be sent as JSON instead of being encoded into the URL.
In other words:
- GET → Read data, no request body
- POST → Usually changes server state, supports request body
- QUERY → Read data, supports request body
This provides a cleaner and more expressive way to perform complex queries while preserving HTTP semantics.
Hono Supports It
Hono is among the first frameworks to officially support the new QUERY method, continuing its reputation for staying modern and developer-friendly.
I’m also happy that I got to contribute to making that happen.
If you haven’t tried Hono yet, I’d definitely recommend checking it out. It’s fast, lightweight, and a joy to build APIs with.
Happy coding! ❤️