111
This commit is contained in:
@@ -29,11 +29,17 @@ class Response implements ResponseInterface
|
|||||||
const FILE = 'file';
|
const FILE = 'file';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws \Kiri\Exception\ConfigException
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$contentType = Config::get('response.format',ContentType::JSON);
|
$contentType = Config::get('response',[
|
||||||
|
'format' => ContentType::JSON,
|
||||||
$this->withContentType($contentType)->withCharset('utf-8');
|
'charset' => 'utf-8'
|
||||||
|
]);
|
||||||
|
$this->withContentType($contentType['format'])
|
||||||
|
->withCharset($contentType['charset']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user