> std::string temp = "{ \"pin\":\"A string\" }"; > curl_easy_setopt(curl, CURLOPT_POST, 1L); > curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, temp.size()); > curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, temp.c_str()); > curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
This is not going to do what you want. It'll send a GET request with a body. Try running your curl command with the "--libcurl" parameter - it'll generate a bit of C code you can look at.
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html