MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / setProxy

Method setProxy

base/poco/Net/src/HTTPClientSession.cpp:138–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137
138void HTTPClientSession::setProxy(const std::string& host, Poco::UInt16 port, const std::string& protocol, bool tunnel)
139{
140 if (protocol != "http" && protocol != "https")
141 throw IllegalStateException("Protocol must be either http or https");
142
143 if (!connected())
144 {
145 _proxyConfig.host = host;
146 _proxyConfig.port = port;
147 _proxyConfig.protocol = protocol;
148 _proxyConfig.tunnel = tunnel;
149 }
150 else throw IllegalStateException("Cannot set the proxy host, port and protocol for an already connected session");
151}
152
153
154void HTTPClientSession::setProxyHost(const std::string& host)

Callers 3

createClientSessionMethod · 0.45
openMethod · 0.45
openMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected