diff --git a/src/network/Curl.cpp b/src/network/Curl.cpp index 55e98988b..ca64f43f3 100644 --- a/src/network/Curl.cpp +++ b/src/network/Curl.cpp @@ -71,10 +71,12 @@ public: hs = curl_slist_append(hs, header.c_str()); } + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, request.body.length()); if (!request.body.empty()) { - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, request.body.length()); curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, request.body.data()); } + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, request.verifySSL); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, request.verifySSL); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hs); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, request.followLocation); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); diff --git a/src/network/commons.hpp b/src/network/commons.hpp index 614821404..46745bfbb 100644 --- a/src/network/commons.hpp +++ b/src/network/commons.hpp @@ -26,6 +26,7 @@ namespace network { OnResponse onResponse; OnReject onReject; bool followLocation = false; + bool verifySSL = true; long maxSize = -1; };