Skip to content

Commit

Permalink
moved headers into class constant
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-inamdar committed Dec 30, 2017
1 parent 85afb10 commit 36c83ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Client
protected const EXTERNAL_REFERENCE_LIMIT = 30;
protected const COUNTRY_CODE = 44;
protected const RESPONSE_FORMAT = 'JSON';
protected const HEADERS = ['Accept' => 'application/json'];

/**
* @var \GuzzleHttp\Client
Expand Down Expand Up @@ -48,7 +49,7 @@ public function __construct(string $username, string $password, string $from = n
{
$this->httpClient = new HttpClient([
'base_uri' => static::URI,
'headers' => ['Accept' => 'application/json'],
'headers' => static::HEADERS,
]);
$this->username = $username;
$this->password = $password;
Expand Down

0 comments on commit 36c83ff

Please sign in to comment.