Re: CURLOPT_XOAUTH2_BEARER use?

2023-02-20 Thread Dan Fandrich via curl-library
On Tue, Feb 21, 2023 at 03:19:12AM +, Matthew Bobowski wrote: > No cast is necessary. > > #define CURLAUTH_BEARER (((unsigned long)1)<<6) Ah, good. Many of the other contants (like CURLSSH_AUTH_* and CURLFTPAUTH_*) *do* need that cast. -- Unsubscribe:

RE: CURLOPT_XOAUTH2_BEARER use?

2023-02-20 Thread Matthew Bobowski via curl-library
No cast is necessary. #define CURLAUTH_BEARER (((unsigned long)1)<<6) Sent from Mail for Windows From: Dan Fandrich via curl-library Sent: Monday, February 20, 2023 10:16 PM To:

Re: CURLOPT_XOAUTH2_BEARER use?

2023-02-20 Thread Dan Fandrich via curl-library
On Tue, Feb 21, 2023 at 03:01:53AM +, Matthew Bobowski via curl-library wrote: > c = curl_easy_setopt(pCurl, CURLOPT_HTTPAUTH, CURLAUTH_BEARER); Don't forget to cast this to a long; this makes a difference in some environments. Dan -- Unsubscribe:

RE: CURLOPT_XOAUTH2_BEARER use?

2023-02-20 Thread Matthew Bobowski via curl-library
Gavin, Example of usage: #include #include #include "curl/curlcategory.hpp" using std::string; Bearer::Bearer(string token) : m_token(token) {} const char* Bearer::get_Token() const noexcept { return m_token.c_str(); } void Bearer::Authenticate(CURL* pCurl) const { CURLcode c =