diff --git a/ThinkPHP/Library/Org/Kudian/Client.class.php b/ThinkPHP/Library/Org/Kudian/Client.class.php index 6181ca8..2759e2a 100644 --- a/ThinkPHP/Library/Org/Kudian/Client.class.php +++ b/ThinkPHP/Library/Org/Kudian/Client.class.php @@ -36,10 +36,10 @@ class Client } curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_POST, TRUE); - $headers = ['Content-type: application/json;charset=utf-8']; + curl_setopt($curl, CURLOPT_POST, true); + $headers = ['Content-type: application/json']; curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); - curl_setopt($curl, CURLOPT_POSTFIELDS, $params); + curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params)); $response = curl_exec($curl); curl_close($curl); return $response;