| 223 | void setPostSize(size_t size); |
| 224 | |
| 225 | void setHTTPProxy(const utils::HTTPProxy &proxy) override { |
| 226 | if (!proxy.host.empty()) { |
| 227 | curl_easy_setopt(http_session_, CURLOPT_PROXY, proxy.host.c_str()); |
| 228 | curl_easy_setopt(http_session_, CURLOPT_PROXYPORT, proxy.port); |
| 229 | if (!proxy.username.empty()) { |
| 230 | curl_easy_setopt(http_session_, CURLOPT_PROXYAUTH, CURLAUTH_ANY); |
| 231 | std::string value = proxy.username + ":" + proxy.password; |
| 232 | curl_easy_setopt(http_session_, CURLOPT_PROXYUSERPWD, value.c_str()); |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | private: |
| 237 | static int onProgress(void *client, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow); |
| 238 |
no test coverage detected