|
|
@@ -80,6 +80,7 @@ json_t *requestJson(RequestMethod method, std::string url, json_t *dataJ) { |
|
|
|
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, reqStr); |
|
|
|
|
|
|
|
std::string resText; |
|
|
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeStringCallback); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &resText); |
|
|
|
|
|
|
@@ -132,6 +133,7 @@ bool requestDownload(std::string url, std::string filename, float *progress) { |
|
|
|
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferInfoCallback); |
|
|
|
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, progress); |
|
|
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); |
|
|
|
|
|
|
|
info("Downloading %s", url.c_str()); |
|
|
|
CURLcode res = curl_easy_perform(curl); |
|
|
|