diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 2cb429f..de9ff5d 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -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; }