add clear
This commit is contained in:
@@ -461,11 +461,7 @@ class HttpClient
|
||||
{
|
||||
$client = new SClient($host, $this->getHostPort(), $this->isSSL);
|
||||
|
||||
$settings = $this->settings();
|
||||
if (!empty($settings)) {
|
||||
$client->set($this->settings());
|
||||
}
|
||||
|
||||
$client->set($this->settings());
|
||||
if (!empty($this->agent)) {
|
||||
$this->header['User-Agent'] = $this->agent;
|
||||
}
|
||||
@@ -475,8 +471,6 @@ class HttpClient
|
||||
if (!empty($this->_data)) {
|
||||
$client->setData($this->_data);
|
||||
}
|
||||
|
||||
$url = ltrim($url, '/');
|
||||
if (strtolower($this->method) == self::GET) {
|
||||
if (!empty($data)) {
|
||||
$url .= '?' . $data;
|
||||
@@ -503,9 +497,6 @@ class HttpClient
|
||||
} else {
|
||||
$client->post($url, $data);
|
||||
}
|
||||
|
||||
var_dump($client, $url);
|
||||
|
||||
$client->close();
|
||||
return $client;
|
||||
}
|
||||
@@ -516,10 +507,10 @@ class HttpClient
|
||||
$sslCert = $this->getSslCertFile();
|
||||
$sslKey = $this->getSslKeyFile();
|
||||
$sslCa = $this->getCa();
|
||||
|
||||
if (empty($sslCert) || empty($sslKey) || empty($sslCa)) {
|
||||
return [];
|
||||
}
|
||||
//
|
||||
// if (empty($sslCert) || empty($sslKey) || empty($sslCa)) {
|
||||
// return [];
|
||||
// }
|
||||
$params['ssl_host_name'] = $this->host;
|
||||
$params['ssl_cert_file'] = $this->getSslCertFile();
|
||||
$params['ssl_key_file'] = $this->getSslKeyFile();
|
||||
|
||||
Reference in New Issue
Block a user