| 417 | } |
| 418 | |
| 419 | void HTTPObject::addHeader(const std::string &name, const std::string &value) |
| 420 | { |
| 421 | std::string header = name + ": " + value; |
| 422 | |
| 423 | //Formatting: Replace spaces with hyphens |
| 424 | size_t nameLen = name.size(); |
| 425 | for (U32 i = 0; i < nameLen; i ++) { |
| 426 | if (header[i] == ' ') |
| 427 | header[i] = '-'; |
| 428 | } |
| 429 | |
| 430 | mHeaders = curl_slist_append(mHeaders, header.c_str()); |
| 431 | } |
| 432 | |
| 433 | void HTTPObject::get(const std::string &address, const std::string &uri, const std::string &query) |
| 434 | { |
no test coverage detected