From 0d514086259d340ac972bdc933be76a5aed35bf5 Mon Sep 17 00:00:00 2001 From: congge Date: Mon, 30 Sep 2019 14:31:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AF=B7=E6=B1=82=E6=94=AF=E6=8C=81ssl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Apollo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Apollo.php b/src/Apollo.php index 1ebf60c..8a4e2de 100644 --- a/src/Apollo.php +++ b/src/Apollo.php @@ -74,7 +74,8 @@ public function request(string $uri, array $options, int $timeout): array } // Request - $client = new Client($this->host, $this->port); + $isSsl = $this->port == 443 ? true : false; + $client = new Client($this->host, $this->port, $isSsl); $client->set(['timeout' => $timeout]); $client->get($uri); $body = $client->body;