Don't run json_encode

Guzzle takes care of this thanks to its JSON middleware
This commit is contained in:
Linus Metzler
2017-10-03 21:16:58 +02:00
committed by GitHub
parent ca80e2c388
commit 566ab3fc70

View File

@@ -67,13 +67,11 @@ class Guzzle implements Adapter
*/
public function put(String $uri, array $headers = [], array $body = []): ResponseInterface
{
$jsonBody = json_encode($body);
$response = $this->client->put(
$uri,
[
'headers' => $headers,
'json' => $jsonBody
'json' => $body
]
);
@@ -86,13 +84,11 @@ class Guzzle implements Adapter
*/
public function patch(String $uri, array $headers = [], array $body = []): ResponseInterface
{
$jsonBody = json_encode($body);
$response = $this->client->patch(
$uri,
[
'headers' => $headers,
'json' => $jsonBody
'json' => $body
]
);