Unverified Commit d5d1bc00 authored by Iris van Ollefen's avatar Iris van Ollefen Committed by GitHub

Update response-helpers.md (#30816)

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`
parent bc7a0be6
...@@ -17,7 +17,7 @@ The included helpers are: ...@@ -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. 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 ```js
export default function handler(req, res) { export default function handler(req, res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment