This commit is contained in:
2023-04-16 15:58:58 +08:00
parent cbcf457e7b
commit eda6f4073e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class ConstrictResponse extends Message implements ResponseInterface
* @param ContentType $type * @param ContentType $type
* @return $this * @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) { if ($data instanceof \Stringable) {
$this->getBody()->write($data->__toString()); $this->getBody()->write($data->__toString());
+1 -1
View File
@@ -78,7 +78,7 @@ class Response implements ResponseInterface
* @param ContentType $type * @param ContentType $type
* @return Response * @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); return $this->__call__(__FUNCTION__, $data, $statusCode, $type);
} }