mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier2: add option to fail on error in cURL params
This commit is contained in:
parent
9f935ec4b4
commit
fa5a8f8be8
@ -26,6 +26,7 @@ struct CURLParams
|
||||
, verifyPeer(false)
|
||||
, followRedirect(false)
|
||||
, verbose(false)
|
||||
, failOnError(true)
|
||||
{}
|
||||
|
||||
void* readFunction;
|
||||
@ -36,6 +37,7 @@ struct CURLParams
|
||||
bool verifyPeer;
|
||||
bool followRedirect;
|
||||
bool verbose;
|
||||
bool failOnError;
|
||||
};
|
||||
|
||||
size_t CURLReadFileCallback(void* data, const size_t size, const size_t nmemb, FILE* stream);
|
||||
|
@ -30,6 +30,7 @@ void CURLInitCommonOptions(CURL* curl, const char* remote,
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, params.timeout);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, params.verbose);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, params.failOnError);
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, params.followRedirect);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, params.verifyPeer);
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
|
||||
|
Loading…
x
Reference in New Issue
Block a user