mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add HttpRequest::verifySSL
This commit is contained in:
parent
0608a9ad3d
commit
effa850337
2 changed files with 4 additions and 1 deletions
|
|
@ -71,10 +71,12 @@ public:
|
||||||
hs = curl_slist_append(hs, header.c_str());
|
hs = curl_slist_append(hs, header.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, request.body.length());
|
||||||
if (!request.body.empty()) {
|
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_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_HTTPHEADER, hs);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, request.followLocation);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, request.followLocation);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ namespace network {
|
||||||
OnResponse onResponse;
|
OnResponse onResponse;
|
||||||
OnReject onReject;
|
OnReject onReject;
|
||||||
bool followLocation = false;
|
bool followLocation = false;
|
||||||
|
bool verifySSL = true;
|
||||||
long maxSize = -1;
|
long maxSize = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue