diff options
author | Wolfy-J <[email protected]> | 2019-01-05 16:13:00 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-01-05 16:13:00 +0300 |
commit | 40d66629617f7a96b9005df356b94ab3b4dfb98f (patch) | |
tree | 9901e93d20d57affbdbc88963956c78586eb0b00 /src/PSR7Client.php | |
parent | d890e973c45fbe53916304321f185ce940776bb7 (diff) |
zend factory dependency elliminated
Diffstat (limited to 'src/PSR7Client.php')
-rw-r--r-- | src/PSR7Client.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PSR7Client.php b/src/PSR7Client.php index 0b148884..1136ce10 100644 --- a/src/PSR7Client.php +++ b/src/PSR7Client.php @@ -1,4 +1,6 @@ <?php +declare(strict_types=1); + /** * High-performance PHP process supervisor and load balancer written in Go * @@ -7,7 +9,6 @@ namespace Spiral\RoadRunner; -use Http\Factory\Diactoros; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestFactoryInterface; use Psr\Http\Message\ServerRequestInterface; @@ -124,10 +125,10 @@ class PSR7Client $headers = new \stdClass(); } - $this->worker->send($response->getBody(), json_encode([ - 'status' => $response->getStatusCode(), - 'headers' => $headers - ])); + $this->worker->send( + $response->getBody()->__toString(), + json_encode(['status' => $response->getStatusCode(), 'headers' => $headers]) + ); } /** |