Skip to content

Commit

Permalink
Update response-helpers.md (vercel#30816)
Browse files Browse the repository at this point in the history
In Setting the status code of a response, it says "returns a name property with the value of John Doe as a JSON response". But, the code example actually returns a message property with a different value.

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
  • Loading branch information
IrisvanOllefen authored Nov 2, 2021
1 parent bc7a0be commit d5d1bc0
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 @@ -17,7 +17,7 @@ The included helpers are:

When sending a response back to the client, you can set the status code of the response.

The following example sets the status code of the response to `200` (`OK`) and returns a `name` property with the value of `John Doe` as a JSON response:
The following example sets the status code of the response to `200` (`OK`) and returns a `message` property with the value of `Hello from Next.js!` as a JSON response:

```js
export default function handler(req, res) {
Expand Down

0 comments on commit d5d1bc0

Please sign in to comment.