diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index c381ceeae3..0bf2ab57ad 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -97,7 +97,11 @@ class Executor ]; $endpoint = $this->selectEndpoint($projectId, $deploymentId); - $response = $this->call($endpoint, self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout); + + $body = ''; + $response = $this->call($endpoint, self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout, callback: function ($chunk) use ($body) { + $body .= $chunk; + }); $status = $response['headers']['status-code']; if ($status >= 400) { @@ -105,7 +109,7 @@ class Executor throw new \Exception($message, $status); } - return $response['body']; + return $body; } /**