From 5de2277e94ff987ff85d2bc431aad8968d9fd66b Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Sun, 8 Jan 2023 20:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ThinkPHP/Library/Org/Kudian/Client.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;