currently disabled as introduces dependency on Dns.h in Ethernet
| 14 | |
| 15 | #ifdef PROXY_ENABLED // currently disabled as introduces dependency on Dns.h in Ethernet |
| 16 | HttpClient::HttpClient(Client& aClient, const char* aProxy, uint16_t aProxyPort) |
| 17 | : iClient(&aClient), iProxyPort(aProxyPort) |
| 18 | { |
| 19 | resetState(); |
| 20 | if (aProxy) |
| 21 | { |
| 22 | // Resolve the IP address for the proxy |
| 23 | DNSClient dns; |
| 24 | dns.begin(Ethernet.dnsServerIP()); |
| 25 | // Not ideal that we discard any errors here, but not a lot we can do in the ctor |
| 26 | // and we'll get a connect error later anyway |
| 27 | (void)dns.getHostByName(aProxy, iProxyAddress); |
| 28 | } |
| 29 | } |
| 30 | #else |
| 31 | HttpClient::HttpClient(Client& aClient) |
| 32 | : iClient(&aClient), iProxyPort(0) |
nothing calls this directly
no outgoing calls
no test coverage detected