Skip to content

Commit

Permalink
Merge pull request picqer#491 from Eligioo/main
Browse files Browse the repository at this point in the history
Replace deprecated rewind_body with Message::rewindBody
  • Loading branch information
casperbakker authored Jul 12, 2021
2 parents 1502a8b + e0a394b commit 8b05ee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Picqer/Financials/Exact/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ private function parseResponse(Response $response, $returnSingleIfPossible = tru
return [];
}

Psr7\rewind_body($response);
Psr7\Message::rewindBody($response);
$json = json_decode($response->getBody()->getContents(), true);
if (false === is_array($json)) {
throw new ApiException('Json decode failed. Got response: ' . $response->getBody()->getContents());
Expand Down Expand Up @@ -536,7 +536,7 @@ private function acquireAccessToken()

$response = $this->client()->post($this->getTokenUrl(), $body);

Psr7\rewind_body($response);
Psr7\Message::rewindBody($response);
$body = json_decode($response->getBody()->getContents(), true);

if (json_last_error() === JSON_ERROR_NONE) {
Expand Down Expand Up @@ -685,7 +685,7 @@ private function parseExceptionForErrorMessages(Exception $e)

$this->extractRateLimits($response);

Psr7\rewind_body($response);
Psr7\Message::rewindBody($response);
$responseBody = $response->getBody()->getContents();
$decodedResponseBody = json_decode($responseBody, true);

Expand Down

0 comments on commit 8b05ee2

Please sign in to comment.