MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / setHTTPProxy

Method setHTTPProxy

extensions/http-curl/client/HTTPClient.h:225–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

create_http_clientMethod · 0.45
onTriggerMethod · 0.45

Calls 2

c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected