| 121 | #ifdef USE_GET_REMOTE_FILE |
| 122 | |
| 123 | static size_t header_write(char *ptr, size_t size, size_t nmemb, vector<string> &list) |
| 124 | { |
| 125 | string str; |
| 126 | |
| 127 | size_t total = size * nmemb; |
| 128 | if (total) |
| 129 | str.append(ptr, total); |
| 130 | |
| 131 | if (str.back() == '\n') |
| 132 | str.resize(str.size() - 1); |
| 133 | if (str.back() == '\r') |
| 134 | str.resize(str.size() - 1); |
| 135 | |
| 136 | list.push_back(std::move(str)); |
| 137 | return total; |
| 138 | } |
| 139 | |
| 140 | bool GetRemoteFile(const char *url, std::string &str, std::string &error, long *responseCode, const char *contentType, |
| 141 | std::string request_type, const char *postData, std::vector<std::string> headers, |
nothing calls this directly
no outgoing calls
no test coverage detected