| 232 | |
| 233 | |
| 234 | void cURLManager::setPostMode(const std::string& _postData) { |
| 235 | CURLcode result; |
| 236 | |
| 237 | postData = _postData; |
| 238 | |
| 239 | result = curl_easy_setopt(easyHandle, CURLOPT_POSTFIELDS, postData.c_str()); |
| 240 | if (result != CURLE_OK) { |
| 241 | debugf(1, "CURLOPT_POSTFIELD error %d : %s\n", result, errorBuffer); |
| 242 | } |
| 243 | result = curl_easy_setopt(easyHandle, CURLOPT_POSTFIELDSIZE, postData.size()); |
| 244 | if (result != CURLE_OK) { |
| 245 | debugf(1, "CURLOPT_POSTFIELD error %d : %s\n", result, errorBuffer); |
| 246 | } |
| 247 | result = curl_easy_setopt(easyHandle, CURLOPT_POST, 1); |
| 248 | if (result != CURLE_OK) { |
| 249 | debugf(1, "CURLOPT_POST error %d : %s\n", result, errorBuffer); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | |
| 254 | void cURLManager::setHTTPPostMode() { |
nothing calls this directly
no test coverage detected