Define CURLAUTH_BEARER as CURLAUTH_ANY with libcurl < 7.61.0
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
20167fdce3
commit
f601e770ac
@ -183,17 +183,12 @@ void CURLWrapper::set_access_token(const string_view access_token)
|
|||||||
_curl_buffer_error};
|
_curl_buffer_error};
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LIBCURL_VERSION_NUM >= 0x073d00 // libcurl >= 7.61.0.
|
#if (LIBCURL_VERSION_NUM < 0x073d00) // libcurl < 7.61.0.
|
||||||
{
|
#define CURLAUTH_BEARER CURLAUTH_ANY
|
||||||
//NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise)
|
#endif
|
||||||
code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_BEARER);
|
|
||||||
}
|
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg, hicpp-signed-bitwise)
|
||||||
#else
|
code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_BEARER);
|
||||||
{
|
|
||||||
//NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise)
|
|
||||||
code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (code != CURLE_OK)
|
if (code != CURLE_OK)
|
||||||
{
|
{
|
||||||
throw CURLException{code, "Could not set authorization token.",
|
throw CURLException{code, "Could not set authorization token.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user