Closed kevinaj closed 4 years ago
Looking further, it's possible this is a wiznet5k issue. Requests defers the entire host portion of the URL to the socket for resolution:
socket = self._get_socket(host, port, proto, timeout=timeout)
Ultimately this falls all the way through adafruit_wiznet5k_socket.getaddrinfo()
, adafruit_wiznet5k.get_host_by_name()
, and finally adafruit_wiznet5k_dns.gethostbyname()
. At no point is there any check to see if the host is an IP and not a name.
Solved this with https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/pull/23
Using an IP address as a host results in an attempt to resolve the IP address via DNS.
src:
output: