diff --git a/src/Client.php b/src/Client.php index 3f74526..f9b1b3a 100644 --- a/src/Client.php +++ b/src/Client.php @@ -488,6 +488,10 @@ public function request(AbstractEndpoint $endpoint): Response $httpClient = new HttpClient($url); + if ($this->config->getScheme() === 'https') { + $httpClient->setEnableSSL(true); + } + if ($this->config->getUsername() && $this->config->getPassword()){ $httpClient->setHeader('authorization','Basic ' . base64_encode($this->config->getUsername().':'.$this->config->getPassword()), false); } @@ -517,4 +521,4 @@ public function request(AbstractEndpoint $endpoint): Response } return $response; } -} \ No newline at end of file +}