SAIO authentication (fast all in one) using libCurl API in C ++
I am working on Open Stack specifically with Swift All in One (SAIO). I need to use C ++ and libcurl for authentication.
Using curl via terminal, I use this command (and it works);
curl -v -H 'X-Auth-User: $ SWIFTACCOUNT: $ SWIFTUSER' -H 'X-Auth-Key: $ SWIFTPASSWORD'
How can I run this command using libcurl in C ++?
+3
source to share
1 answer
Add --libcurl code.c
to your command line and you've got a great first template to start with!
CURLOPT_HTTPHEADER an option curl_easy_setopt you need.
See also httpcustomheader.c for a complete libcurl example using custom HTTP headers.
+1
source to share