add clear

This commit is contained in:
as2252258@163.com
2020-03-16 19:37:00 +08:00
parent f6daf53a58
commit aa8b93799b
+3 -1
View File
@@ -465,10 +465,12 @@ class HttpClient
}
echo $url . PHP_EOL;
if ($this->method != self::GET) {
var_dump($this->_data, $data);
if (!empty($this->_data)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data);
} else {
if (is_array($data)) {
$data = http_build_query($data);
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
}