Skip to content

Commit

Permalink
docs: Document response status with empty body (#1445)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc-Aurèle DARCHE <madarche@users.noreply.github.com>
  • Loading branch information
madarche and madarche committed Apr 18, 2020
1 parent 7deedb2 commit 8ddab48
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 8ddab48

Please sign in to comment.