This commit is contained in:
2023-07-03 22:56:59 +08:00
parent f01ea83447
commit bced72d811
4 changed files with 202 additions and 159 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ class ConstrictResponse extends Message implements ResponseInterface
* @param int $statusCode
* @return $this
*/
public function html(string $content, int $statusCode = 200): static
public function html(string $content = '', int $statusCode = 200): static
{
$this->getBody()->write($content);
return $this->withContentType(ContentType::HTML)->withStatus($statusCode);