Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document response status with empty body #1445

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/api/response.md
Expand Up @@ -90,6 +90,16 @@ __NOTE__: don't worry too much about memorizing these strings,
if you have a typo an error will be thrown, displaying this list
so you can make a correction.

Since `response.status` default is set to `404`, to send a response
without a body and with a different status is to be done like this:

```js
ctx.response.status = 200;

// Or whatever other status
ctx.response.status = 204;
```

### response.message

Get response status message. By default, `response.message` is
Expand Down