改名
This commit is contained in:
@@ -81,9 +81,9 @@ class Client extends ClientAbstracts
|
|||||||
private function generate_client($data, $host, $isHttps, $path): SClient
|
private function generate_client($data, $host, $isHttps, $path): SClient
|
||||||
{
|
{
|
||||||
if ($isHttps || $this->isSSL()) {
|
if ($isHttps || $this->isSSL()) {
|
||||||
$client = new SClient($host, 443, $this->isSSL());
|
$client = new SClient($host, 443, true);
|
||||||
} else {
|
} else {
|
||||||
$client = new SClient($host, $this->getPort(), $this->isSSL());
|
$client = new SClient($host, $this->getPort(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($path, '/') !== 0) {
|
if (strpos($path, '/') !== 0) {
|
||||||
@@ -94,6 +94,7 @@ class Client extends ClientAbstracts
|
|||||||
$this->addHeader('User-Agent', $this->getAgent());
|
$this->addHeader('User-Agent', $this->getAgent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var_dump($this->getHeader());
|
||||||
$client->setHeaders($this->getHeader());
|
$client->setHeaders($this->getHeader());
|
||||||
$client->setMethod(strtoupper($this->getMethod()));
|
$client->setMethod(strtoupper($this->getMethod()));
|
||||||
if (strtolower($this->getMethod()) == self::GET && !empty($data)) {
|
if (strtolower($this->getMethod()) == self::GET && !empty($data)) {
|
||||||
|
|||||||
@@ -736,7 +736,6 @@ abstract class ClientAbstracts extends Component implements IClient
|
|||||||
if (strpos($path, '/') !== 0) {
|
if (strpos($path, '/') !== 0) {
|
||||||
$path = '/' . $path;
|
$path = '/' . $path;
|
||||||
}
|
}
|
||||||
var_dump($this->host, $domain, $isHttps, $path);
|
|
||||||
return [$this->host, $isHttps, $path];
|
return [$this->host, $isHttps, $path];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user