add clear
This commit is contained in:
@@ -327,6 +327,13 @@ class HttpClient
|
||||
if (strtolower($this->method) == self::GET) {
|
||||
echo $host . ':' . $this->getHostPort() . ' ' . $url . '?' . $data;
|
||||
$client->get($url . '?' . $data);
|
||||
} else if (strtolower($this->method) == self::PUT) {
|
||||
$client->setMethod('PUT');
|
||||
if (!is_string($data)) {
|
||||
$data = json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$client->setData($data);
|
||||
$client->execute($url);
|
||||
} else {
|
||||
echo $host . ':' . $this->getHostPort() . ' ' . $url;
|
||||
$client->post($url, $data);
|
||||
|
||||
Reference in New Issue
Block a user