Answer the question
In order to leave comments, you need to log in
How to send base64+ c++ post request parameters using curlcpp?
How to send base64 post request?
If you just send
string.c_str ()
then everything will not work exactly.
Yes
- const string BASE_64 = "what without code";
- Library curpcpp
Here is the code, what needs to be fixed?
Help me please!
CURL* curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, URL_in.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, DATA_POST.c_str());
res = curl_easy_perform(curl);
if (res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
}
curl_easy_cleanup(curl);
}
curl_global_cleanup();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question