add clear

This commit is contained in:
as2252258@163.com
2020-01-07 12:57:24 +08:00
parent 0eb014d511
commit 2a2b163188
+1 -11
View File
@@ -251,15 +251,6 @@ class HttpClient
* @return string * @return string
*/ */
private function parseUrlHost(&$url) private function parseUrlHost(&$url)
{
return $this->parseHost($url);
}
/**
* @param $url
* @return string
*/
private function parseHost(&$url)
{ {
if (!empty($this->host)) { if (!empty($this->host)) {
$url = $this->host . '/' . ltrim($url, '/'); $url = $this->host . '/' . ltrim($url, '/');
@@ -288,8 +279,8 @@ class HttpClient
if ($this->port !== 443) { if ($this->port !== 443) {
$this->isSSL = false; $this->isSSL = false;
} }
$url = '/' . implode('/', $explode);
} }
$url = '/' . implode('/', $explode);
return $first; return $first;
} }
@@ -345,7 +336,6 @@ class HttpClient
*/ */
private function coroutine($ip, $url, $data = []) private function coroutine($ip, $url, $data = [])
{ {
var_dump($ip, $url);
$client = $this->generate_client($ip, $url, $data); $client = $this->generate_client($ip, $url, $data);
if ($client->statusCode < 0) { if ($client->statusCode < 0) {
throw new \Exception($client->errMsg); throw new \Exception($client->errMsg);