Skip to content

Commit

Permalink
Always use query client arguments instead of building the URL (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnCZek committed Jan 4, 2023
1 parent 0b59646 commit b4f45a6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Providers/SteamProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ public function user(): UserContract
*/
protected function getUserByToken($token): array
{
$params = [
'key' => $this->clientSecret,
'steamids' => $token,
];

$userUrl = self::USER_INFO_URL . '?' . http_build_query($params);

$response = $this->getHttpClient()->get($userUrl);
$response = $this->getHttpClient()->get(self::USER_INFO_URL, [
'query' => [
'key' => $this->clientSecret,
'steamids' => $token,
],
]);

$user = json_decode($response->getBody()->getContents(), true);

Expand Down

0 comments on commit b4f45a6

Please sign in to comment.