89 curl = curl_easy_init();
91 std::cerr <<
"CURL init error!" << std::endl;
95 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
97 curl_easy_setopt(curl, CURLOPT_WRITEDATA, readBuffer);
98 curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
99 res = curl_easy_perform(curl);
101 curl_easy_cleanup(curl);
103 if (res != CURLE_OK) {
104 std::cerr <<
"Response code " << res << std::endl;
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
Function called by CUrl on DownloadURL.
Definition: WAEngine.cpp:69