add clear

This commit is contained in:
2020-09-24 11:47:35 +08:00
parent b5a8102b72
commit c5468c95fc
+1 -3
View File
@@ -171,7 +171,6 @@ class HttpClient
public function setHost(string $host)
{
$this->host = $this->replaceHost($host);
var_dump($this->host);
$match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/';
if (preg_match($match_quest, $this->host)) {
$this->addHeader('Host', $this->host);
@@ -380,10 +379,9 @@ class HttpClient
return $this->curl($url, $data);
}
$url = $this->matchHost(ltrim($url, '/'));
if (!empty($this->port)) {
if (!empty($this->port) && $this->port != 443) {
$this->host .= ':' . $this->port;
}
var_dump('https://' . $this->host . '/' . $url);
if ($this->isSSL) {
return $this->curl('https://' . $this->host . '/' . $url, $data);
} else {