It holds the [[headers]], [[cookies]] and [[content]] that is to be sent to the client.
It also controls the HTTP [[statusCode|status code]].
Response is configured as an application component in Application by default.
You can access that instance via Yii::$app->response.
You can modify its configuration by adding an array to your application config under components
as it is shown in the following example:
php
'response' => [
'format' => yii\web\Response::FORMAT_JSON,
'charset' => 'UTF-8',
...
]
For more details and usage information on Response, see the guide article on responses.