This commit is contained in:
2025-07-21 17:26:51 +08:00
parent 3251045a5b
commit 926cbea0b9
4 changed files with 22 additions and 20 deletions
+7
View File
@@ -21,6 +21,12 @@ class Response implements ResponseInterface
public ContentType $contentType = ContentType::JSON;
/**
* @var array
*/
public array $headers = [];
/**
* @var string|ResponseEmitterInterface
*/
@@ -33,6 +39,7 @@ class Response implements ResponseInterface
public function __construct()
{
$this->contentType = \config('response.content-type', ContentType::JSON);
$this->headers = \config('response.headers', []);
$this->emmit = \config('response.emmit', SwooleHttpResponseEmitter::class);
}