add clear
This commit is contained in:
@@ -262,6 +262,7 @@ class HttpClient
|
|||||||
if ($this->checkIsIp($host)) {
|
if ($this->checkIsIp($host)) {
|
||||||
return $host;
|
return $host;
|
||||||
}
|
}
|
||||||
|
var_dump($host);
|
||||||
return System::gethostbyname($host);
|
return System::gethostbyname($host);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +338,6 @@ class HttpClient
|
|||||||
private function coroutine($ip, $url, $data = [])
|
private function coroutine($ip, $url, $data = [])
|
||||||
{
|
{
|
||||||
$client = $this->generate_client($ip, $url, $data);
|
$client = $this->generate_client($ip, $url, $data);
|
||||||
var_dump($client);
|
|
||||||
if ($client->statusCode < 0) {
|
if ($client->statusCode < 0) {
|
||||||
throw new \Exception($client->errMsg);
|
throw new \Exception($client->errMsg);
|
||||||
}
|
}
|
||||||
@@ -346,7 +346,6 @@ class HttpClient
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
$header = $client->getHeaders();
|
$header = $client->getHeaders();
|
||||||
var_dump($ip, $url, $data, $body, $data, $header);
|
|
||||||
|
|
||||||
$body = $this->resolve($header, $body);
|
$body = $this->resolve($header, $body);
|
||||||
|
|
||||||
@@ -392,6 +391,7 @@ class HttpClient
|
|||||||
if (!empty($this->agent)) {
|
if (!empty($this->agent)) {
|
||||||
$this->header['User-Agent'] = $this->agent;
|
$this->header['User-Agent'] = $this->agent;
|
||||||
}
|
}
|
||||||
|
var_dump($host, $this->getHostPort(), $this->header), $this->method;
|
||||||
if (!empty($this->header)) {
|
if (!empty($this->header)) {
|
||||||
$client->setHeaders($this->parseHeaderMat());
|
$client->setHeaders($this->parseHeaderMat());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user