Skip to content

Commit 45dcc83

Browse files
committed
bumped guzzle to 6.0
1 parent 4b75397 commit 45dcc83

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=5.4.0",
14-
"guzzlehttp/guzzle": "~5.0",
14+
"guzzlehttp/guzzle": "~6.1",
1515
"ext-json": "*",
1616
"adoy/oauth2": "~1.3",
1717
"firebase/php-jwt" : "~2.2"

src/API/RequestBuilder.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,14 @@ public function call() {
8989
$method = $this->method;
9090

9191
try {
92-
93-
$response = $client->$method($this->getUrl(), array(
92+
93+
$response = $client->request($this->method, $this->getUrl(), [
9494
'headers' => $this->headers,
95-
'body' => $this->body
96-
));
95+
'body' => $this->body,
96+
]);
97+
$body = (string) $response->getBody();
9798

98-
return $response->json(array('object' => false));
99+
return $this->jsonDecode($body, true);
99100

100101
} catch (RequestException $e) {
101102
throw $e;

0 commit comments

Comments
 (0)