Skip to content

Commit

Permalink
Content-Type Fixed For Token
Browse files Browse the repository at this point in the history
  • Loading branch information
dsingh-dev committed Feb 15, 2024
1 parent 46ce798 commit cb7bf92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ public function send(string $method, string $url, array $options): array {
$parsedBody = json_decode($body->getContents(), true);
}

if (in_array('application/json; charset=utf-8', $response->getHeader('Content-Type'))) {
$parsedBody = json_decode($body->getContents(), true);
}

$this->lastResponse = [
'body' => $parsedBody,
'headers' => $parsedHeaders,
Expand Down

0 comments on commit cb7bf92

Please sign in to comment.