Register endpoint
This commit is contained in:
@@ -14,6 +14,11 @@ class Response
|
||||
|
||||
public static function json($value, int $options = 0, int $dept = 512)
|
||||
{
|
||||
if (is_bool($value)) {
|
||||
Response::response()->header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($value, $options, $dept);
|
||||
exit(0);
|
||||
}
|
||||
return SimpleRouter::response()->json($value, $options, $dept);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user