add clear

This commit is contained in:
2020-04-03 17:29:43 +08:00
parent c7484da782
commit df41369095
+6 -3
View File
@@ -410,8 +410,6 @@ class HttpClient
$body = $client->body;
var_dump($body);
$header = $client->getHeaders();
$body = $this->resolve($header, $body);
@@ -462,7 +460,12 @@ class HttpClient
private function generate_client($host, $url, $data)
{
$client = new SClient($host, $this->getHostPort(), $this->isSSL);
$client->set($this->settings());
$settings = $this->settings();
if (!empty($settings)) {
$client->set($this->settings());
}
if (!empty($this->agent)) {
$this->header['User-Agent'] = $this->agent;
}