diff --git a/framework/core/src/Api/Actions/JsonApiAction.php b/framework/core/src/Api/Actions/JsonApiAction.php index e5d4b7c6c..cfa1abe50 100644 --- a/framework/core/src/Api/Actions/JsonApiAction.php +++ b/framework/core/src/Api/Actions/JsonApiAction.php @@ -43,7 +43,10 @@ abstract class JsonApiAction implements ActionInterface $data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT); - return new Response($data, $status); + $response = new Response('php://memory', $status); + $response->getBody()->write($data); + + return $response; } /**