Skip to content

Commit

Permalink
Fix Guzzle 5 method call
Browse files Browse the repository at this point in the history
  • Loading branch information
ffiebig committed Nov 8, 2021
1 parent 17e824a commit 529cc73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Utils/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function request($method, $url, $payload = [], $options = null)

$baseHeaders = [
'Content-Type' => 'application/json',
'User-Agent' => 'SDK-PHP/'.$installedVersion,
'User-Agent' => 'SDK-PHP/' . $installedVersion,
];

$givenHeaders = isset($options['headers']) ? $options['headers'] : [];
Expand Down Expand Up @@ -66,10 +66,12 @@ protected function sendGuzzle5Request($method, $url, array $headers, $payload)
{
$client = new Client();

return $client->request($method, $url, [
$request = $client->createRequest($method, $url, [
'headers' => $headers,
'body' => $payload,
]);

return $client->send($request);
}

/**
Expand Down

0 comments on commit 529cc73

Please sign in to comment.