diff --git a/src/Client.php b/src/Client.php index eff06b2..31e6e56 100644 --- a/src/Client.php +++ b/src/Client.php @@ -121,7 +121,11 @@ private function send(string $method, string $url, array $data = []): array { $authParams = ['auth' => [$this->login, $this->password], 'json' => $data]; $response = $this->client->request($method, $url, $authParams); + $stream = $response->getBody(); + if ($stream->isSeekable()) { + $stream->seek(0); + } - return json_decode($response->getBody()->getContents(), true); + return json_decode($stream->getContents(), true); } }