();
// curl返回值
CURLcode res;
if (curl)
{
// set params
//设置curl的请求头
struct curl_slist...请求
curl_easy_setopt(curl, CURLOPT_POST, 1);
//设置请求的URL地址
curl_easy_setopt(curl, CURLOPT_URL, url.c_str...());
//设置post请求的参数
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postParams.c_str());
//设置ssl验证...curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST...(curl, CURLOPT_TIMEOUT, 6);
// 开启post请求
res = curl_easy_perform(curl);
}
//释放curl
curl_easy_cleanup