From eda6f4073e95d699445213ed72883dafd46d798d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 16 Apr 2023 15:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Constrict/ConstrictResponse.php | 2 +- src/Response.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Constrict/ConstrictResponse.php b/src/Constrict/ConstrictResponse.php index 236f357..a5cbe77 100644 --- a/src/Constrict/ConstrictResponse.php +++ b/src/Constrict/ConstrictResponse.php @@ -36,7 +36,7 @@ class ConstrictResponse extends Message implements ResponseInterface * @param ContentType $type * @return $this */ - public function write(mixed $data, int $statusCode = 200, ContentType $type = ContentType::JSON): static + public function write(mixed $data, int $statusCode = 200, ContentType $type = ContentType::HTML): static { if ($data instanceof \Stringable) { $this->getBody()->write($data->__toString()); diff --git a/src/Response.php b/src/Response.php index 419399b..d452652 100644 --- a/src/Response.php +++ b/src/Response.php @@ -78,7 +78,7 @@ class Response implements ResponseInterface * @param ContentType $type * @return Response */ - public function write(mixed $data, int $statusCode = 200, ContentType $type = ContentType::JSON): static + public function write(mixed $data, int $statusCode = 200, ContentType $type = ContentType::HTML): static { return $this->__call__(__FUNCTION__, $data, $statusCode, $type); }