mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-27 00:24:00 -06:00
Enable http digest authentication for CURL
This commit is contained in:
parent
c5b06dc1ff
commit
0a932ebfe3
5 changed files with 50 additions and 3 deletions
|
@ -448,6 +448,15 @@ Http& Http::auth_digest(const std::string &user, const std::string &password)
|
|||
return *this;
|
||||
}
|
||||
|
||||
Http& Http::auth_basic(const std::string &user, const std::string &password)
|
||||
{
|
||||
curl_easy_setopt(p->curl, CURLOPT_USERNAME, user.c_str());
|
||||
curl_easy_setopt(p->curl, CURLOPT_PASSWORD, password.c_str());
|
||||
curl_easy_setopt(p->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Http& Http::ca_file(const std::string &name)
|
||||
{
|
||||
if (p && priv::ca_file_supported(p->curl)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue