master
elf 2 years ago
parent f73ed7ac55
commit 5de2277e94

@ -36,10 +36,10 @@ class Client
} }
curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, TRUE); curl_setopt($curl, CURLOPT_POST, true);
$headers = ['Content-type: application/json;charset=utf-8']; $headers = ['Content-type: application/json'];
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params));
$response = curl_exec($curl); $response = curl_exec($curl);
curl_close($curl); curl_close($curl);
return $response; return $response;

Loading…
Cancel
Save