Update napi_helper.cpp

Moved brace and added proxy for CurlSOAPHelper
This commit is contained in:
tastymeatball 2022-08-26 16:57:37 +02:00 committed by GitHub
parent 03708c4513
commit cf1f97da2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,8 @@ CurlRequestHelper::CurlRequestHelper()
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(m_curl, CURLOPT_MAXREDIRS, 2); curl_easy_setopt(m_curl, CURLOPT_MAXREDIRS, 2);
if(GetConfig().proxy_server.GetValue() != "") { if(GetConfig().proxy_server.GetValue() != "")
{
curl_easy_setopt(m_curl, CURLOPT_PROXY, GetConfig().proxy_server.GetValue().c_str()); curl_easy_setopt(m_curl, CURLOPT_PROXY, GetConfig().proxy_server.GetValue().c_str());
} }
} }
@ -220,6 +221,11 @@ CurlSOAPHelper::CurlSOAPHelper()
// SSL // SSL
curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_FUNCTION, _sslctx_function_SOAP); curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_FUNCTION, _sslctx_function_SOAP);
curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_DATA, NULL); curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_DATA, NULL);
if(GetConfig().proxy_server.GetValue() != "")
{
curl_easy_setopt(m_curl, CURLOPT_PROXY, GetConfig().proxy_server.GetValue().c_str());
}
} }
CurlSOAPHelper::~CurlSOAPHelper() CurlSOAPHelper::~CurlSOAPHelper()