add clear

This commit is contained in:
as2252258@163.com
2019-12-25 16:32:54 +08:00
parent 9f87d4f8f9
commit 224bd81184
+5 -1
View File
@@ -416,7 +416,11 @@ class HttpClient
curl_setopt($ch, CURLOPT_POST, 1);
}
if ($this->method != self::GET) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
if (!empty($this->_data)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data);
} else {
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
}
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($this->method));