Skip to content

Commit

Permalink
Merge pull request #91 from storyblok/feature/int-979
Browse files Browse the repository at this point in the history
INT-979 Added agent headers to every request
  • Loading branch information
joaokamun authored Jul 15, 2023
2 parents 185b2a1 + 2bed715 commit 5e51ee5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Storyblok/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
class BaseClient
{
const SDK_VERSION = '2.6.1';

const EXCEPTION_GENERIC_HTTP_ERROR = 'An HTTP Error has occurred!';

const DEFAULT_PER_PAGE = 25;
Expand Down Expand Up @@ -82,6 +84,10 @@ function __construct($apiKey = null, $apiEndpoint = null, $apiVersion = 'v2', $s
$this->client = new Guzzle([
'base_uri' => $this->generateEndpoint($apiEndpoint, $apiVersion, $ssl, $apiRegion),
'handler' => $handlerStack,
'headers' => [
'SB-Agent' => 'SB-PHP',
'SB-Agent-Version' => static::SDK_VERSION,
],
]);
}

Expand Down

0 comments on commit 5e51ee5

Please sign in to comment.