curl = curl_easy_init();
if (NULL == curl)
{
return -1;
}
char szUrl[512] = { 0 };
sprintf(szUrl, "https://%s:443%s", ip, url);
curl_easy_setopt(curl, CURLOPT_URL, szUrl);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "HTTP/1.1");
headers = curl_slist_append(headers, "Accept: application/json, text/plain, */*; q=0.01");
headers = curl_slist_append(headers, "Content-Type: application/json; charset=UTF-8");
headers = curl_slist_append(headers, "X-Requested-With: XMLHttpRequest");
headers = curl_slist_append(headers, "Accept-Language: zh-CN");
headers = curl_slist_append(headers, "Accept-Encoding: gzip, deflate");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, send_len);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, send);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)curl_write_callbackFunc);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &strRecv);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, false);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 3);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 4);解释一下上述代码