diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index d44322e..2c6ceba 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -626,7 +626,16 @@ class HttpClient try { $this->method = self::POST; $this->addHeader('Content-Type', 'multipart/form-data;charset=UTF-8'); - $output = $this->curlParse($url, $params); + $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); if ($output === FALSE) { return new Result(['code' => 500, 'message' => $output]); }