diff --git a/src/Request.php b/src/Request.php index 6a0ab4d..a800073 100644 --- a/src/Request.php +++ b/src/Request.php @@ -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,