From 87dd5dee46d9165e71f829a589d9af9a5cc5b70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 25 Nov 2020 11:04:48 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index d1bbb9b..fa34cf2 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -681,7 +681,10 @@ class HttpClient curl_setopt($ch, CURLOPT_POST, 1); } - if (!empty($data)) { + if (!empty($this->_data)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data); + } + if ($this->method != self::GET) { curl_setopt($ch, CURLOPT_POSTFIELDS, $data); }