From a741d040ce59a41541e543d5cb4e9504bebf06ca Mon Sep 17 00:00:00 2001 From: Ben Botvinick Date: Tue, 30 Jun 2020 15:48:19 -0400 Subject: [PATCH] Add documentation for `res.redirect` --- docs/api-routes/response-helpers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-routes/response-helpers.md b/docs/api-routes/response-helpers.md index 93fd1623f03ea..9912571a659b7 100644 --- a/docs/api-routes/response-helpers.md +++ b/docs/api-routes/response-helpers.md @@ -25,3 +25,4 @@ The included helpers are: - `res.status(code)` - A function to set the status code. `code` must be a valid [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) - `res.json(json)` - Sends a JSON response. `json` must be a valid JSON object - `res.send(body)` - Sends the HTTP response. `body` can be a `string`, an `object` or a `Buffer` +- `res.redirect([status,] path)` - Redirects to a specified path or URL. `status` must be a valid [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). If not specified, `status` defaults to "302" "Found".