Harmonize response guides and add more details on Boom access

This commit is contained in:
Aurelsicoko 2017-10-11 14:47:04 +02:00
parent 43ad741814
commit 3d84a34c5c

View File

@ -2,14 +2,14 @@
See the [responses concepts](../concepts/concepts.md#responses) for details.
## Context Response
The context object (`ctx`) contains a list of values and functions useful to manage server responses. They are accessible through `ctx.response`, from [controllers](controllers.md) and [policies](policies.md).
### API Reference
For more information, please refer to the [Koa response documentation](http://koajs.com/#response).
## Context Response
The context object (`ctx`) contains a list of values and functions useful to manage server responses. They are accessible through `ctx.response`, from [controllers](controllers.md) and [policies](policies.md).
#### response.header
Response header object.
@ -635,6 +635,8 @@ Strapi integrates [Boom](https://github.com/hapijs/boom): a set of utilities for
You can also override responses based on them status. Please read the [configuration responses](../configurations/configurations.md#responses) for that.
> Note: Every Boom's functions is delegated to the context. It means that `ctx.notFound` is a shortcut to `ctx.response.notFound`.
### API Reference
For more information, please refer to the [Boom documentation](https://github.com/hapijs/boom).