未验证 提交 8ddab48c 编写于 作者: M Marc-Aurèle DARCHE 提交者: GitHub

docs: Document response status with empty body (#1445)

Co-authored-by: NMarc-Aurèle DARCHE <madarche@users.noreply.github.com>
上级 7deedb23
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册