MCPcopy Create free account
hub / github.com/amcewen/HttpClient / HttpClient

Method HttpClient

HttpClient.cpp:16–29  ·  view source on GitHub ↗

currently disabled as introduces dependency on Dns.h in Ethernet

Source from the content-addressed store, hash-verified

14
15#ifdef PROXY_ENABLED // currently disabled as introduces dependency on Dns.h in Ethernet
16HttpClient::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
31HttpClient::HttpClient(Client& aClient)
32 : iClient(&aClient), iProxyPort(0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected