From 860166f37fd0de248220b0ea97f7e56abd2c0037 Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya Date: Mon, 29 Jun 2026 01:30:40 +0300 Subject: [PATCH 01/10] docs: add app.query() method to API documentation and update routing guide for QUERY method support --- src/content/api/5x/api/application/index.mdx | 52 ++++++++++++++++++++ src/content/docs/en/5x/guide/routing.mdx | 2 +- src/content/docs/ko/5x/guide/routing.mdx | 2 +- src/content/docs/zh-cn/5x/guide/routing.mdx | 2 +- src/content/docs/zh-tw/5x/guide/routing.mdx | 2 +- 5 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index c5c78a444f..0c5ba17a45 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -961,6 +961,58 @@ app.put('/', (req, res) => { }); ``` +### app.query() + + + + + The path for which the middleware function is invoked; can be any of: a string representing a + path, a path pattern, a regular expression pattern to match paths, or an array of combinations + of any of the above. For examples, see [Path examples](#path-examples). + + + Callback functions; can be: a middleware function, a series of middleware functions (separated + by commas), an array of middleware functions, or a combination of all of the above. You can + provide multiple callback functions that behave just like middleware, except that these + callbacks can invoke `next('route')` to bypass the remaining route callback(s). You can use + this mechanism to impose pre-conditions on a route, then pass control to subsequent routes if + there is no reason to proceed with the current route. Since [router](/api/router/) and + [app](/api/application/) implement the middleware interface, you can use them as you would any + other middleware function. For examples, see [Middleware callback function + examples](#middleware-callback-function-examples). + + + + +Routes HTTP QUERY requests to the specified path with the specified callback functions. +For more information, see the [routing guide](/guide/routing/). + + + +The HTTP QUERY method was standardized on June 15, 2026 as [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html). +Client and intermediary support is still limited — verify that your target environments support the QUERY verb before relying on it in production. + + + +The HTTP QUERY method ([RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html)) is designed for +queries whose input is too large or too sensitive to encode in the URL. Unlike `GET`, a QUERY +request carries a body containing the query input. Unlike `POST`, it is explicitly **safe and +idempotent**, intermediaries and caches can retry it automatically, and the response is cacheable +(with the request body included in the cache key). + +Use `app.query()` when query parameters would exceed URL length limits, contain sensitive data that +should not appear in server logs or browser history, or require a structured body format such as JSON. + +#### Example + +```js +app.query('/search', (req, res) => { + // complex filter criteria arrive in req.body, not the URL + const results = db.search(req.body); + res.json(results); +}); +``` + ### app.render() diff --git a/src/content/docs/en/5x/guide/routing.mdx b/src/content/docs/en/5x/guide/routing.mdx index 452d603633..2a0c3813d7 100644 --- a/src/content/docs/en/5x/guide/routing.mdx +++ b/src/content/docs/en/5x/guide/routing.mdx @@ -63,7 +63,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethod). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { diff --git a/src/content/docs/ko/5x/guide/routing.mdx b/src/content/docs/ko/5x/guide/routing.mdx index c24b1f6395..a6ee7577db 100644 --- a/src/content/docs/ko/5x/guide/routing.mdx +++ b/src/content/docs/ko/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { diff --git a/src/content/docs/zh-cn/5x/guide/routing.mdx b/src/content/docs/zh-cn/5x/guide/routing.mdx index c24b1f6395..a6ee7577db 100644 --- a/src/content/docs/zh-cn/5x/guide/routing.mdx +++ b/src/content/docs/zh-cn/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { diff --git a/src/content/docs/zh-tw/5x/guide/routing.mdx b/src/content/docs/zh-tw/5x/guide/routing.mdx index c24b1f6395..a6ee7577db 100644 --- a/src/content/docs/zh-tw/5x/guide/routing.mdx +++ b/src/content/docs/zh-tw/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { From f4b5ae937063abf2abc05b3b6b4fa71f02791a19 Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya Date: Mon, 29 Jun 2026 01:38:03 +0300 Subject: [PATCH 02/10] docs: undo for guides in other languages --- src/content/docs/ko/5x/guide/routing.mdx | 2 +- src/content/docs/zh-cn/5x/guide/routing.mdx | 2 +- src/content/docs/zh-tw/5x/guide/routing.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/ko/5x/guide/routing.mdx b/src/content/docs/ko/5x/guide/routing.mdx index a6ee7577db..c24b1f6395 100644 --- a/src/content/docs/ko/5x/guide/routing.mdx +++ b/src/content/docs/ko/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { diff --git a/src/content/docs/zh-cn/5x/guide/routing.mdx b/src/content/docs/zh-cn/5x/guide/routing.mdx index a6ee7577db..c24b1f6395 100644 --- a/src/content/docs/zh-cn/5x/guide/routing.mdx +++ b/src/content/docs/zh-cn/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { diff --git a/src/content/docs/zh-tw/5x/guide/routing.mdx b/src/content/docs/zh-tw/5x/guide/routing.mdx index a6ee7577db..c24b1f6395 100644 --- a/src/content/docs/zh-tw/5x/guide/routing.mdx +++ b/src/content/docs/zh-tw/5x/guide/routing.mdx @@ -52,7 +52,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethodpath-callback--callback-). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { From 40e090f54fbee1be0d9b0b1690cdbc2906f7dcf7 Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya Date: Mon, 29 Jun 2026 01:51:00 +0300 Subject: [PATCH 03/10] docs: add warning for QUERY support requirements in API documentation --- src/content/api/5x/api/application/index.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index 0c5ba17a45..c2df95d521 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -994,6 +994,12 @@ Client and intermediary support is still limited — verify that your target env + + +QUERY support requires **Node.js >= 21.7.2** and it is stable on Node.js >= 22. + + + The HTTP QUERY method ([RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html)) is designed for queries whose input is too large or too sensitive to encode in the URL. Unlike `GET`, a QUERY request carries a body containing the query input. Unlike `POST`, it is explicitly **safe and From 2ec620fdca33b9d9ffac4a5836416c983b35c674 Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya Date: Mon, 29 Jun 2026 01:58:39 +0300 Subject: [PATCH 04/10] docs: add QUERY method to routing methods in API documentation --- src/content/api/5x/api/application/index.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index c2df95d521..7d55a14690 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -725,6 +725,9 @@ Express supports the following routing methods corresponding to the HTTP methods
  • put
  • +
  • + query +
  • report
  • From 46b90b306d0d465d6705334ffa16146ede1052a1 Mon Sep 17 00:00:00 2001 From: Murat Kirazkaya Date: Tue, 30 Jun 2026 21:05:54 +0300 Subject: [PATCH 05/10] docs: update API documentation to include app.query() method and its usage, and modify routing guide to reflect QUERY method support --- src/content/api/4x/api/application/index.mdx | 61 ++++++++++++++++++++ src/content/docs/en/4x/guide/routing.mdx | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index c0c557de89..674b690209 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -694,6 +694,9 @@ Express supports the following routing methods corresponding to the HTTP methods
  • put
  • +
  • + query +
  • report
  • @@ -749,6 +752,64 @@ For more information, see [app.all](#appall). For more information on routing, see the [routing guide](/guide/routing/). +### app.query() + + + + + The path for which the middleware function is invoked; can be any of: a string representing a + path, a path pattern, a regular expression pattern to match paths, or an array of combinations + of any of the above. For examples, see [Path examples](#path-examples). + + + Callback functions; can be: a middleware function, a series of middleware functions (separated + by commas), an array of middleware functions, or a combination of all of the above. You can + provide multiple callback functions that behave just like middleware, except that these + callbacks can invoke `next('route')` to bypass the remaining route callback(s). You can use + this mechanism to impose pre-conditions on a route, then pass control to subsequent routes if + there is no reason to proceed with the current route. Since [router](/api/router/) and + [app](/api/application/) implement the middleware interface, you can use them as you would any + other middleware function. For examples, see [Middleware callback function + examples](#middleware-callback-function-examples). + + + + +Routes HTTP QUERY requests to the specified path with the specified callback functions. +For more information, see the [routing guide](/guide/routing/). + + + +The HTTP QUERY method was standardized on June 15, 2026 as [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html). +Client and intermediary support is still limited — verify that your target environments support the QUERY verb before relying on it in production. + + + + + +QUERY support requires **Node.js >= 21.7.2** and it is stable on Node.js >= 22. + + + +The HTTP QUERY method ([RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html)) is designed for +queries whose input is too large or too sensitive to encode in the URL. Unlike `GET`, a QUERY +request carries a body containing the query input. Unlike `POST`, it is explicitly **safe and +idempotent**, intermediaries and caches can retry it automatically, and the response is cacheable +(with the request body included in the cache key). + +Use `app.query()` when query parameters would exceed URL length limits, contain sensitive data that +should not appear in server logs or browser history, or require a structured body format such as JSON. + +#### Example + +```js +app.query('/search', (req, res) => { + // complex filter criteria arrive in req.body, not the URL + const results = db.search(req.body); + res.json(results); +}); +``` + ### app.param() diff --git a/src/content/docs/en/4x/guide/routing.mdx b/src/content/docs/en/4x/guide/routing.mdx index c77af1ab42..ccaf7c6c6b 100644 --- a/src/content/docs/en/4x/guide/routing.mdx +++ b/src/content/docs/en/4x/guide/routing.mdx @@ -63,7 +63,7 @@ app.post('/', (req, res) => { Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on. For a full list, see [app.METHOD](/api/application#appmethod). -There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). +There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods). ```js app.all('/secret', (req, res, next) => { From ac4c0bb186317d2255b68e1dbdecf9797ff29ab3 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 30 Jun 2026 15:23:29 -0500 Subject: [PATCH 06/10] docs: update API documentation to include links for routing methods and add app.query() method details --- src/content/api/4x/api/application/index.mdx | 27 ++++++++++++-------- src/content/api/5x/api/application/index.mdx | 27 ++++++++++++-------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index 674b690209..dca8143e30 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -646,10 +646,10 @@ Express supports the following routing methods corresponding to the HTTP methods copy
  • - delete + delete
  • - get + get
  • head @@ -684,7 +684,7 @@ Express supports the following routing methods corresponding to the HTTP methods patch
  • - post + post
    • @@ -692,10 +692,10 @@ Express supports the following routing methods corresponding to the HTTP methods purge
    • - put + put
    • - query + query (Node.js >= 22.0.0)
    • report @@ -719,7 +719,7 @@ Express supports the following routing methods corresponding to the HTTP methods The API documentation has explicit entries only for the most popular HTTP methods `app.get()`, -`app.post()`, `app.put()`, and `app.delete()`. +`app.post()`, `app.put()`, `app.delete()`, and `app.query()`. However, the other methods listed above work in exactly the same way. To route methods that translate to invalid JavaScript variable names, use the bracket notation. For example, `app['m-search']('/', function ...`. @@ -781,13 +781,13 @@ For more information, see the [routing guide](/guide/routing/). The HTTP QUERY method was standardized on June 15, 2026 as [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html). -Client and intermediary support is still limited — verify that your target environments support the QUERY verb before relying on it in production. +Client and intermediary support is still limited. Verify that your target environments support the QUERY verb before relying on it in production. -QUERY support requires **Node.js >= 21.7.2** and it is stable on Node.js >= 22. +QUERY support requires **Node.js >= 22.0.0**. @@ -798,11 +798,18 @@ idempotent**, intermediaries and caches can retry it automatically, and the resp (with the request body included in the cache key). Use `app.query()` when query parameters would exceed URL length limits, contain sensitive data that -should not appear in server logs or browser history, or require a structured body format such as JSON. +should not appear in server logs or browser history, or are too complex to express cleanly as a URL +query string, such as deeply nested filters or structured criteria. + +Because the query input travels in the request body, `req.body` is `undefined` until you mount a +body-parsing middleware such as [`express.json()`](/api/express/#expressjson) or +[`express.urlencoded()`](/api/express/#expressurlencoded) that matches the request's `Content-Type`. #### Example -```js +```js title="index.js" +app.use(express.json()); // populate req.body for application/json payloads + app.query('/search', (req, res) => { // complex filter criteria arrive in req.body, not the URL const results = db.search(req.body); diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index 7d55a14690..17bd9c19b2 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -677,10 +677,10 @@ Express supports the following routing methods corresponding to the HTTP methods copy
    • - delete + delete
    • - get + get
    • head @@ -715,7 +715,7 @@ Express supports the following routing methods corresponding to the HTTP methods patch
    • - post + post
      @@ -723,10 +723,10 @@ Express supports the following routing methods corresponding to the HTTP methods purge
    • - put + put
    • - query + query (Node.js >= 22.0.0)
    • report @@ -750,7 +750,7 @@ Express supports the following routing methods corresponding to the HTTP methods The API documentation has explicit entries only for the most popular HTTP methods `app.get()`, -`app.post()`, `app.put()`, and `app.delete()`. +`app.post()`, `app.put()`, `app.delete()`, and `app.query()`. However, the other methods listed above work in exactly the same way. To route methods that translate to invalid JavaScript variable names, use the bracket notation. For example, `app['m-search']('/', function ...`. @@ -993,13 +993,13 @@ For more information, see the [routing guide](/guide/routing/). The HTTP QUERY method was standardized on June 15, 2026 as [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html). -Client and intermediary support is still limited — verify that your target environments support the QUERY verb before relying on it in production. +Client and intermediary support is still limited. Verify that your target environments support the QUERY verb before relying on it in production. -QUERY support requires **Node.js >= 21.7.2** and it is stable on Node.js >= 22. +QUERY support requires **Node.js >= 22.0.0**. @@ -1010,11 +1010,18 @@ idempotent**, intermediaries and caches can retry it automatically, and the resp (with the request body included in the cache key). Use `app.query()` when query parameters would exceed URL length limits, contain sensitive data that -should not appear in server logs or browser history, or require a structured body format such as JSON. +should not appear in server logs or browser history, or are too complex to express cleanly as a URL +query string, such as deeply nested filters or structured criteria. + +Because the query input travels in the request body, `req.body` is `undefined` until you mount a +body-parsing middleware such as [`express.json()`](/api/express/#expressjson) or +[`express.urlencoded()`](/api/express/#expressurlencoded) that matches the request's `Content-Type`. #### Example -```js +```js title="index.js" +app.use(express.json()); // populate req.body for application/json payloads + app.query('/search', (req, res) => { // complex filter criteria arrive in req.body, not the URL const results = db.search(req.body); From 475b6b56b3d184bd320592b90d487d7f81d8cccc Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 30 Jun 2026 15:52:51 -0500 Subject: [PATCH 07/10] docs: enhance Signature component to include runtime requirement and update related documentation --- .../patterns/Signature/Signature.astro | 26 ++++++++++++++++--- .../patterns/Signature/Signature.css | 10 +++++++ src/content/api/4x/api/application/index.mdx | 8 +----- src/content/api/5x/api/application/index.mdx | 8 +----- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/components/patterns/Signature/Signature.astro b/src/components/patterns/Signature/Signature.astro index 028a0df229..4f5116e725 100644 --- a/src/components/patterns/Signature/Signature.astro +++ b/src/components/patterns/Signature/Signature.astro @@ -19,6 +19,8 @@ * * * + * + * = 22.0.0" }}>… */ import './Signature.css'; @@ -27,20 +29,28 @@ interface Props { returns?: string; /** Type for a property. */ type?: string; - /** Version the member was added in, e.g. `"v4.16.0"`. */ + /** Package version the member was added in, e.g. `"v4.16.0"`. */ since?: string; + /** + * Runtime requirements as a map of engine name to version constraint, e.g. + * `{ "Node.js": ">= 22.0.0" }`, for members gated by the runtime rather than an + * Express release. Renders one pill per entry. + */ + runtime?: Record; /** Version the member was deprecated in, e.g. `"v4.11.0"`. */ deprecated?: string; /** Heading text for the arguments section. */ attributesTitle?: string; } -const { returns, type, since, deprecated, attributesTitle = 'Arguments' } = Astro.props; +const { returns, type, since, runtime, deprecated, attributesTitle = 'Arguments' } = Astro.props; + +const runtimeEntries = runtime ? Object.entries(runtime) : []; const hasReturnsSlot = Astro.slots.has('returns'); const hasReturns = hasReturnsSlot || Boolean(returns); const hasAttributes = Astro.slots.has('attributes'); -const hasFooter = Boolean(type) || hasReturns || Boolean(since) || Boolean(deprecated); +const hasFooter = Boolean(type) || hasReturns || Boolean(since) || runtimeEntries.length > 0 || Boolean(deprecated); ---
      @@ -79,6 +89,16 @@ const hasFooter = Boolean(type) || hasReturns || Boolean(since) || Boolean(depre {since}

      )} + {runtimeEntries.length > 0 && ( +

      + Requires runtime: + {runtimeEntries.map(([name, version]) => ( + + {name} {version} + + ))} +

      + )} {deprecated && (

      Deprecated in: diff --git a/src/components/patterns/Signature/Signature.css b/src/components/patterns/Signature/Signature.css index 3a0ed97ad4..60360e70dc 100644 --- a/src/components/patterns/Signature/Signature.css +++ b/src/components/patterns/Signature/Signature.css @@ -68,6 +68,16 @@ color: var(--color-text-error); } + .type-tag--runtime { + border-color: var(--color-border-warning); + background-color: var(--color-bg-warning); + color: var(--color-text-warning); + } + + .signature__line--runtime .signature__line-label { + color: var(--color-text-warning); + } + .signature__params { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index dca8143e30..891de4feef 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -754,7 +754,7 @@ For more information on routing, see the [routing guide](/guide/routing/). ### app.query() - += 22.0.0" }}> The path for which the middleware function is invoked; can be any of: a string representing a @@ -785,12 +785,6 @@ Client and intermediary support is still limited. Verify that your target enviro - - -QUERY support requires **Node.js >= 22.0.0**. - - - The HTTP QUERY method ([RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html)) is designed for queries whose input is too large or too sensitive to encode in the URL. Unlike `GET`, a QUERY request carries a body containing the query input. Unlike `POST`, it is explicitly **safe and diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index 17bd9c19b2..31b29f8c05 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -966,7 +966,7 @@ app.put('/', (req, res) => { ### app.query() - += 22.0.0" }}> The path for which the middleware function is invoked; can be any of: a string representing a @@ -997,12 +997,6 @@ Client and intermediary support is still limited. Verify that your target enviro - - -QUERY support requires **Node.js >= 22.0.0**. - - - The HTTP QUERY method ([RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html)) is designed for queries whose input is too large or too sensitive to encode in the URL. Unlike `GET`, a QUERY request carries a body containing the query input. Unlike `POST`, it is explicitly **safe and From 0d62f07708ab041e864327cbf3f694d810a733f9 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 30 Jun 2026 16:00:45 -0500 Subject: [PATCH 08/10] docs: update API documentation for app.query() method to reflect Node.js version requirements --- src/content/api/4x/api/application/index.mdx | 4 ++-- src/content/api/5x/api/application/index.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index 891de4feef..a3ef5e8c50 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -695,7 +695,7 @@ Express supports the following routing methods corresponding to the HTTP methods put

    • - query (Node.js >= 22.0.0) + query
    • report @@ -754,7 +754,7 @@ For more information on routing, see the [routing guide](/guide/routing/). ### app.query() -= 22.0.0" }}> +=20.19.3 <21 || >=22.2.0" }}> The path for which the middleware function is invoked; can be any of: a string representing a diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index 31b29f8c05..d55302c129 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -726,7 +726,7 @@ Express supports the following routing methods corresponding to the HTTP methods put
    • - query (Node.js >= 22.0.0) + query
    • report @@ -966,7 +966,7 @@ app.put('/', (req, res) => { ### app.query() -= 22.0.0" }}> +=20.19.3 <21 || >=22.2.0" }}> The path for which the middleware function is invoked; can be any of: a string representing a From 85584523ea3e2261546a6c7097801c7f86df055a Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 30 Jun 2026 16:13:34 -0500 Subject: [PATCH 09/10] docs: format routing method links and add info about router.query() in API documentation --- .../patterns/Signature/Signature.astro | 3 ++- src/content/api/4x/api/application/index.mdx | 22 ++++++++++++++----- src/content/api/4x/api/router/index.mdx | 6 +++++ src/content/api/5x/api/application/index.mdx | 22 ++++++++++++++----- src/content/api/5x/api/router/index.mdx | 6 +++++ 5 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/components/patterns/Signature/Signature.astro b/src/components/patterns/Signature/Signature.astro index 4f5116e725..24408ac9b8 100644 --- a/src/components/patterns/Signature/Signature.astro +++ b/src/components/patterns/Signature/Signature.astro @@ -50,7 +50,8 @@ const runtimeEntries = runtime ? Object.entries(runtime) : []; const hasReturnsSlot = Astro.slots.has('returns'); const hasReturns = hasReturnsSlot || Boolean(returns); const hasAttributes = Astro.slots.has('attributes'); -const hasFooter = Boolean(type) || hasReturns || Boolean(since) || runtimeEntries.length > 0 || Boolean(deprecated); +const hasFooter = + Boolean(type) || hasReturns || Boolean(since) || runtimeEntries.length > 0 || Boolean(deprecated); ---
      diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index a3ef5e8c50..ebab882cc8 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -646,10 +646,14 @@ Express supports the following routing methods corresponding to the HTTP methods copy
    • - delete + + delete +
    • - get + + get +
    • head @@ -684,7 +688,9 @@ Express supports the following routing methods corresponding to the HTTP methods patch
    • - post + + post +
      @@ -692,10 +698,14 @@ Express supports the following routing methods corresponding to the HTTP methods purge
    • - put + + put +
    • - query + + query +
    • report @@ -754,7 +764,7 @@ For more information on routing, see the [routing guide](/guide/routing/). ### app.query() -=20.19.3 <21 || >=22.2.0" }}> +=20.19.3 <21 || >=22.2.0' }}> The path for which the middleware function is invoked; can be any of: a string representing a diff --git a/src/content/api/4x/api/router/index.mdx b/src/content/api/4x/api/router/index.mdx index 5b5ac1f504..3c0fed0dc6 100644 --- a/src/content/api/4x/api/router/index.mdx +++ b/src/content/api/4x/api/router/index.mdx @@ -162,6 +162,12 @@ The `router.get()` function is automatically called for the HTTP `HEAD` method i + + +`router.query()` routes HTTP `QUERY` requests, mirroring [`app.query()`](/api/application/#appquery). The `QUERY` method is gated by the runtime and requires Node.js `>=20.19.3 <21 || >=22.2.0`. + + + You can provide multiple callbacks, and all are treated equally, and behave just like middleware, except that these callbacks may invoke `next('route')` to bypass the remaining route callback(s). You can use this mechanism to perform diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index d55302c129..66b413c52f 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -677,10 +677,14 @@ Express supports the following routing methods corresponding to the HTTP methods copy
    • - delete + + delete +
    • - get + + get +
    • head @@ -715,7 +719,9 @@ Express supports the following routing methods corresponding to the HTTP methods patch
    • - post + + post +
      @@ -723,10 +729,14 @@ Express supports the following routing methods corresponding to the HTTP methods purge
    • - put + + put +
    • - query + + query +
    • report @@ -966,7 +976,7 @@ app.put('/', (req, res) => { ### app.query() -=20.19.3 <21 || >=22.2.0" }}> +=20.19.3 <21 || >=22.2.0' }}> The path for which the middleware function is invoked; can be any of: a string representing a diff --git a/src/content/api/5x/api/router/index.mdx b/src/content/api/5x/api/router/index.mdx index 7fd7c55ab6..764c35101c 100644 --- a/src/content/api/5x/api/router/index.mdx +++ b/src/content/api/5x/api/router/index.mdx @@ -162,6 +162,12 @@ The `router.get()` function is automatically called for the HTTP `HEAD` method i + + +`router.query()` routes HTTP `QUERY` requests, mirroring [`app.query()`](/api/application/#appquery). The `QUERY` method is gated by the runtime and requires Node.js `>=20.19.3 <21 || >=22.2.0`. + + + You can provide multiple callbacks, and all are treated equally, and behave just like middleware, except that these callbacks may invoke `next('route')` to bypass the remaining route callback(s). You can use this mechanism to perform From 52b9e72e6e86a4d794d3149e0e03448658432290 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 30 Jun 2026 16:30:36 -0500 Subject: [PATCH 10/10] docs: update API documentation for routing methods and enhance styling for two-column layouts --- src/content/api/4x/api/application/index.mdx | 116 +++++-------------- src/content/api/5x/api/application/index.mdx | 116 +++++-------------- src/styles/utilities/_utilities.css | 12 ++ 3 files changed, 66 insertions(+), 178 deletions(-) diff --git a/src/content/api/4x/api/application/index.mdx b/src/content/api/4x/api/application/index.mdx index ebab882cc8..98ee878851 100644 --- a/src/content/api/4x/api/application/index.mdx +++ b/src/content/api/4x/api/application/index.mdx @@ -637,95 +637,33 @@ PUT, POST, and so on, in lowercase. Thus, the actual methods are `app.get()`, Express supports the following routing methods corresponding to the HTTP methods of the same names: -
      -
        -
      • - checkout -
      • -
      • - copy -
      • -
      • - - delete - -
      • -
      • - - get - -
      • -
      • - head -
      • -
      • - lock -
      • -
      • - merge -
      • -
      • - mkactivity -
      • -
      -
        -
      • - mkcol -
      • -
      • - move -
      • -
      • - m-search -
      • -
      • - notify -
      • -
      • - options -
      • -
      • - patch -
      • -
      • - - post - -
      • -
      -
        -
      • - purge -
      • -
      • - - put - -
      • -
      • - - query - -
      • -
      • - report -
      • -
      • - search -
      • -
      • - subscribe -
      • -
      • - trace -
      • -
      • - unlock -
      • -
      • - unsubscribe -
      • -
      +
      + +- `checkout` +- `copy` +- [`delete`](#appdelete) +- [`get`](#appget) +- `head` +- `lock` +- `merge` +- `mkactivity` +- `mkcol` +- `move` +- `m-search` +- `notify` +- `options` +- `patch` +- [`post`](#apppost) +- `purge` +- [`put`](#appput) +- [`query`](#appquery) +- `report` +- `search` +- `subscribe` +- `trace` +- `unlock` +- `unsubscribe` +
      The API documentation has explicit entries only for the most popular HTTP methods `app.get()`, diff --git a/src/content/api/5x/api/application/index.mdx b/src/content/api/5x/api/application/index.mdx index 66b413c52f..27629e173e 100644 --- a/src/content/api/5x/api/application/index.mdx +++ b/src/content/api/5x/api/application/index.mdx @@ -668,95 +668,33 @@ PUT, POST, and so on, in lowercase. Thus, the actual methods are `app.get()`, Express supports the following routing methods corresponding to the HTTP methods of the same names: -
      -
        -
      • - checkout -
      • -
      • - copy -
      • -
      • - - delete - -
      • -
      • - - get - -
      • -
      • - head -
      • -
      • - lock -
      • -
      • - merge -
      • -
      • - mkactivity -
      • -
      -
        -
      • - mkcol -
      • -
      • - move -
      • -
      • - m-search -
      • -
      • - notify -
      • -
      • - options -
      • -
      • - patch -
      • -
      • - - post - -
      • -
      -
        -
      • - purge -
      • -
      • - - put - -
      • -
      • - - query - -
      • -
      • - report -
      • -
      • - search -
      • -
      • - subscribe -
      • -
      • - trace -
      • -
      • - unlock -
      • -
      • - unsubscribe -
      • -
      +
      + +- `checkout` +- `copy` +- [`delete`](#appdelete) +- [`get`](#appget) +- `head` +- `lock` +- `merge` +- `mkactivity` +- `mkcol` +- `move` +- `m-search` +- `notify` +- `options` +- `patch` +- [`post`](#apppost) +- `purge` +- [`put`](#appput) +- [`query`](#appquery) +- `report` +- `search` +- `subscribe` +- `trace` +- `unlock` +- `unsubscribe` +
      The API documentation has explicit entries only for the most popular HTTP methods `app.get()`, diff --git a/src/styles/utilities/_utilities.css b/src/styles/utilities/_utilities.css index 178d00c126..bb1af452bd 100644 --- a/src/styles/utilities/_utilities.css +++ b/src/styles/utilities/_utilities.css @@ -149,6 +149,18 @@ margin: var(--space-8); } +/* Columns — flow a list into two columns. Wrap the list in an element with this class. */ +.columns-2 :is(ul, ol) { + column-count: 2; + column-gap: var(--space-8); + padding-left: 0; + list-style-position: inside; +} + +.columns-2 li { + break-inside: avoid; +} + .disable-transitions *, .disable-transitions *::before, .disable-transitions *::after {