Skip to content

Commit

Permalink
update: base client
Browse files Browse the repository at this point in the history
- add user agent for metric purposes
  • Loading branch information
HDVinnie committed Sep 24, 2024
1 parent 588070c commit 3b8aec2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Clients/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final public function request(string $method, string $endpoint, array $params =
$response = Http::withHeaders([
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$this->token,
'User-Agent' => 'Laravel Polar API Package by HDInnovations', // For internal metrics
])->$method($this->baseUrl.$endpoint, $params);

if ($response->status() === 422) {
Expand Down

0 comments on commit 3b8aec2

Please sign in to comment.