Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
docs(response-helpers): Update res.json definition (vercel#24782)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErfanMirzapour committed May 5, 2021
1 parent 85ee15f commit 9b53be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-routes/response-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function handler(req, res) {
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.json(body)` - Sends a JSON response. `body` must be a [serialiazable object](https://developer.mozilla.org/en-US/docs/Glossary/Serialization)
- `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 "307" "Temporary redirect".

Expand Down

0 comments on commit 9b53be9

Please sign in to comment.