add clear
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user