From 65422f37fbc3de54d18b1648d546cf4f28fd252d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 24 Aug 2020 11:30:39 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 2c6ceba..d3f760b 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -625,17 +625,7 @@ class HttpClient { try { $this->method = self::POST; - $this->addHeader('Content-Type', 'multipart/form-data;charset=UTF-8'); - $curl = curl_init(); - if ($headers = $this->parseHeaderMat()) { - curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); - } - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_POST, true); - curl_setopt($curl, CURLOPT_POSTFIELDS, $params); - $output = curl_exec($curl); - curl_close($curl); + $output = $this->curlParse($url, $params); if ($output === FALSE) { return new Result(['code' => 500, 'message' => $output]); }