This commit is contained in:
2020-12-24 11:12:23 +08:00
parent 5a7c7176dc
commit f18031c2c0
18 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ namespace HttpServer\Http\Formatter;
use Exception;
use Snowflake\Core\JSON;
use Snowflake\Core\Json;
use HttpServer\Application;
use Swoole\Http\Response;
use HttpServer\IInterface\IFormatter;
@@ -38,7 +38,7 @@ class HtmlFormatter extends Application implements IFormatter
public function send($context): static
{
if (!is_string($context)) {
$context = JSON::encode($context);
$context = Json::encode($context);
}
$this->data = $context;
return $this;