Skip to content

fastify-http-queryFastify HTTP QUERY method plugin

Enable the safe, idempotent, cacheable HTTP QUERY method in Fastify.

Deprecated

This package is deprecated and no longer needed on Fastify >= 5.11.0.

Native support for the HTTP QUERY method (RFC 10008) is built into Fastify core starting from v5.11.0 (#6832), including QUERY in supportedMethods, the fastify.query() shorthand, TypeScript types, and Content-Type header enforcement (FST_ERR_ROUTE_MISSING_CONTENT_TYPE).

Migration: Upgrade to fastify >= 5.11.0 (or >= 5.12.6 if you rely on media types that allow an empty body, fixed in #7060), uninstall @thecodepace/fastify-http-query, and remove app.register(fastifyHttpQuery). Your app.query() routes will work out of the box. If your code checks for FST_ERR_QUERY_MISSING_CONTENT_TYPE, switch to Fastify's FST_ERR_ROUTE_MISSING_CONTENT_TYPE.

What is this? ​

@thecodepace/fastify-http-query is a Fastify plugin that enables the HTTP QUERY method. QUERY is a safe, idempotent, cacheable HTTP method that — unlike GET — carries a request body describing the query operation.

This documentation site complements the project's README and CHANGELOG. The README stays the canonical install/usage reference; this site adds a navigable surface for the parts that benefit from a sidebar: the API reference, the error codes, and the integration patterns.

Where to next ​

Released under the MIT License.