Skip to content

Commit

Permalink
Fix constuctor
Browse files Browse the repository at this point in the history
  • Loading branch information
mrprompt committed Dec 18, 2020
1 parent 337b9e5 commit 2fc3d07
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Base/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ final class HttpClient extends Client
*/
public function __construct(string $token, string $mode = self::PRODUCTION)
{
parent::__construct();

$this->baseUrl = self::CLIENT_URLS[$mode];

$this->headers = [
'Content-Type' => 'application/json',
'User-Agent' => self::USER_AGENT,
Expand All @@ -43,5 +40,9 @@ public function __construct(string $token, string $mode = self::PRODUCTION)
'Accept' => 'application/json',
'Authorization' => 'Bearer ' . $token,
];
}

parent::__construct([
'base_uri' => $this->baseUrl,
'headers' => $this->headers,
]); }
}

0 comments on commit 2fc3d07

Please sign in to comment.