Hi!
I'm trying to turn a (working) command-line call to curl into an equivalent
c++ program.
The following command line I was able to translate into c++
curl --location --request POST 'https://servername.domain/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencod
On Mon, 23 May 2022, J via curl-library wrote:
curl_easy_setopt( curl, CURLOPT_HEADER, "Content-Type:
application/x-www-form-urlencoded" );
curl_easy_setopt( curl, CURLOPT_HEADER, ( (
(std::string)"Authorization: Bearer" ) + token ).c_str() );
These are wrong.
"CURLOPT_HEADER
On 5/23/2022 11:15 AM, J via curl-library wrote:
> I'm trying to turn a (working) command-line call to curl into an
> equivalent c++ program.
Use option --libcurl filename.c and the curl tool will generate C code
for libcurl. [1]
[1]: https://curl.se/docs/manpage.html#--libcurl
--
Unsubscribe
Ray, thank you very much for the info, I didn't know that was a possibility.
I tried it and was able to extract the necessary libcurl calls to succeed.
Thank you again
On Tue, 24 May 2022 at 03:17, Ray Satiro via curl-library <
curl-library@lists.haxx.se> wrote:
> On 5/23/2022 11:15 AM, J via cur