add clear

This commit is contained in:
2020-08-24 11:30:39 +08:00
parent eaaec85239
commit 65422f37fb
+1 -11
View File
@@ -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]);
}