| 136 | |
| 137 | |
| 138 | void 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 | |
| 154 | void HTTPClientSession::setProxyHost(const std::string& host) |
no outgoing calls
no test coverage detected