mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
Harmonize response guides and add more details on Boom access
This commit is contained in:
parent
43ad741814
commit
3d84a34c5c
@ -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).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user