curl *curl; curlcode res; curl_global_init(curl_global_default); curl = curl_easy_init(); if (curl) { string html; curl_easy_setopt(curl, curlopt_url, "https://www.google.com"); curl_easy_setopt(curl, curlopt_followlocation, 1l); curl_easy_setopt(curl, curlopt_writedata, &html); curl_easy_setopt(curl, curlopt_writefunction, writer); curl_easy_setopt(curl, curlopt_cainfo, "d:\\certification\\digicerthighassuranceevrootca.crt"); res = curl_easy_perform(curl); cout << "error : " << curl_easy_strerror(res) << endl; cout << html;
the error message unsupported protocol
the http site okay https site doesn't work
what should add in curl_easy_setopt()
Comments
Post a Comment