Skip to content

Commit 772f1f4

Browse files
authored
Merge pull request #27 from EdwinHoksberg/revert-26-fix/add-guzzle-client-options
Revert "added Guzzle options to prevent PHP fatal error"
2 parents 333a546 + 493fac6 commit 772f1f4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/FcmClient.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,18 @@ public static function create(string $apiToken, string $projectId): FcmClient
5858
*
5959
* @return array
6060
*/
61-
public function send(Request $request, array $arguments): array
61+
public function send(Request $request): array
6262
{
63-
$default = [
64-
'json' => $request->getBody(),
65-
'http_errors' => false
66-
];
67-
68-
$options = is_array($arguments) && isset($arguments) ? $arguments : $default;
6963
// Build guzzle api client.
7064
$client = $this->getGuzzleClient();
7165

7266
// Generate request url.
7367
$url = $request->getUrl();
7468

7569
// Create and send the request.
76-
$response = $client->post($url, $options);
70+
$response = $client->post($url, [
71+
'json' => $request->getBody()
72+
]);
7773

7874
// Decode the response body from json to a plain php array.
7975
$body = json_decode($response->getBody()->getContents(), true);

0 commit comments

Comments
 (0)