This commit is contained in:
2020-11-18 11:49:04 +08:00
parent 66608806e5
commit 8325127593
+4 -1
View File
@@ -63,6 +63,10 @@ class Curl extends ClientAbstracts
[$host, $isHttps, $path] = $this->matchHost($path); [$host, $isHttps, $path] = $this->matchHost($path);
$resource = $this->do(curl_init($host . $path), $host . $path, self::POST); $resource = $this->do(curl_init($host . $path), $host . $path, self::POST);
curl_setopt($resource, CURLOPT_POST, 1);
curl_setopt($resource, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($resource, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($resource, CURLOPT_SSL_VERIFYHOST, false);
@curl_setopt($resource, CURLOPT_POSTFIELDS, $params); @curl_setopt($resource, CURLOPT_POSTFIELDS, $params);
if ($isHttps !== false) { if ($isHttps !== false) {
@@ -143,7 +147,6 @@ class Curl extends ClientAbstracts
private function execute($curl) private function execute($curl)
{ {
$output = curl_exec($curl); $output = curl_exec($curl);
var_dump($output);
if ($output === false) { if ($output === false) {
return $this->fail(400, curl_error($curl)); return $this->fail(400, curl_error($curl));
} }