Skip to content

Commit

Permalink
Fixes response decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
moay committed Apr 23, 2019
1 parent 2b1d9ee commit 92c8eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/Decoder/ResponseDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getDecodedResponse(Request $request)
{
try {
$response = $this->client->sendRequest($request);
$decodedResponse = json_decode($response->getBody(), true);
$decodedResponse = json_decode($response->getBody()->getContents(), true);

if(!in_array($response->getStatusCode(), range(200, 299))) {
if ($this->cacheEndpoint && $this->cache->has($this->getCacheId($request))) {
Expand Down Expand Up @@ -83,4 +83,4 @@ private function getCacheId(Request $request)
)
);
}
}
}

0 comments on commit 92c8eb3

Please sign in to comment.