add clear
This commit is contained in:
@@ -262,7 +262,6 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,15 +390,14 @@ 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(), $url, $this->header, $this->method);
|
|
||||||
if (!empty($this->header)) {
|
if (!empty($this->header)) {
|
||||||
$client->setHeaders($this->parseHeaderMat());
|
$client->setHeaders($this->parseHeaderMat());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strtolower($this->method) == self::GET) {
|
if (strtolower($this->method) == self::GET) {
|
||||||
if (!empty($this->_data)) {
|
if (!empty($this->_data)) {
|
||||||
$client->setData($this->_data);
|
$client->setData($this->_data);
|
||||||
}
|
}
|
||||||
|
var_dump($this->_data);
|
||||||
$client->get($url . '?' . $data);
|
$client->get($url . '?' . $data);
|
||||||
} else if (strtolower($this->method) == self::PUT) {
|
} else if (strtolower($this->method) == self::PUT) {
|
||||||
$client->setMethod('PUT');
|
$client->setMethod('PUT');
|
||||||
|
|||||||
Reference in New Issue
Block a user