I'm using Python 3.7's Http Client to make an https request, which uses a corporate proxy with credentials. I'm getting socket.gai
error. pls help me with on how to use proxy with credentials for http.client, also let me know If the below error mentioned is due to proxy or not
import http.client
getApi = http.client.HTTPSConnection("www.example.com")
getApi.set_tunnel(host,port)
getApi.request("GET", "/")
resp = getApi.getresponse()
print(resp.status)
The error I get
File "C:\Program Files\Python37-32\lib\socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11004] getaddrinfo failed