在发送网页请求时,发现很久未响应,最后报错:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='svr-6-9009.share.51env.net', port=443): Max retries exceeded with url: /prod-api/getInfo (Caused by ProxyError('Unable to connect to proxy. Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))))
原因:是因为发送请求时开启了fiddler,
解决方法:关闭fiddler,重新发请求。
此外:如果postman发送请求时提示“Could not get any response”,则也要去检查是否fiddler开启了,此时把fiddler关闭了,就能正常发送请求。