DeepForge-Tech / DeepForge-Toolset

DeepForge Toolset - cross-platform installer of necessary tools for programming.
GNU General Public License v3.0
3 stars 2 forks source link

Исправление ошибки(проверка ssl сертификата) curl #17

Closed Blackflame576 closed 1 year ago

Blackflame576 commented 1 year ago
curl = curl_easy_init();    
curl_easy_setopt(curl, CURLOPT_URL, formedLink.c_str());
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER, false); // ОТКЛЮЧАЕМ ПРОВЕРКУ СЕРТИФИКАТА СЕРВЕРА
curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl,CURLOPT_WRITEDATA, &readBuffer);
response = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (response==CURLE_OK)  std::cout << readBuffer << std::endl; // Запрос отработал если код CURLE_OK
else std::cout << curl_easy_strerror(response) << std::endl;