Skip to content

Commit a187218

Browse files
Fixed reading of response if it has been already read
Fixed reading of response if it has been already read by something else (like guzzle logging middleware). It happens that ->getContents() don't rewind the Stream. But __toString does.
1 parent f4f1819 commit a187218

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IntercomClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function getAuth()
181181
private function handleResponse(Response $response)
182182
{
183183
$stream = stream_for($response->getBody());
184-
$data = json_decode($stream->getContents());
184+
$data = json_decode($stream);
185185
return $data;
186186
}
187187
}

0 commit comments

Comments
 (0)