在發送網頁請求時,發現很久未響應,最后報錯:
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關閉了,就能正常發送請求。