|
|
@ -22,6 +22,7 @@ class HttpClient {
|
|
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($postDataString)));
|
|
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($postDataString)));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$postDataString = http_build_query($postData);//格式化参数
|
|
|
|
$postDataString = http_build_query($postData);//格式化参数
|
|
|
|
|
|
|
|
echo $postDataString;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); //对认证证书来源的检查
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); //对认证证书来源的检查
|
|
|
|