Open fncalderong opened 6 years ago
Hi, I am trying to create a client, but it gives the following error:
requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: http://schemas.xmlsoap.org/soap/encoding/
I am actually give it proxy authentication by using
proxies = { "http": 'http://**host**:8080', "https": 'http://**host**:8080' }
session = Session() session.proxies = proxies session.auth = HTTPBasicAuth('user', 'pass*') transport = Transport(session=session) print(transport) client = Client(wsdl='Soap/InformacionComercial_Wsdl.xml', transport=transport)...
But if I use
import requests proxies = {"http": 'http://host:8080', "https": 'http://host:8080'} auth = requests.auth.HTTPProxyAuth('user', 'pass*') r = requests.get('http://schemas.xmlsoap.org/soap/encoding/', proxies=proxies, auth=auth) print(r.status_code, r.reason)
ir returns 200 OK. Thanks for your help.
Your working example uses HTTPProxyAuth, but your non-working example code uses HTTPBasicAuth. Is that what's causing the issue?
HTTPProxyAuth
HTTPBasicAuth
Hi, i have the same issue, can u pls share how did you fix it?
Hi, I am trying to create a client, but it gives the following error:
requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: http://schemas.xmlsoap.org/soap/encoding/
I am actually give it proxy authentication by using
proxies = { "http": 'http://**host**:8080', "https": 'http://**host**:8080' }
session = Session() session.proxies = proxies session.auth = HTTPBasicAuth('user', 'pass*') transport = Transport(session=session) print(transport) client = Client(wsdl='Soap/InformacionComercial_Wsdl.xml', transport=transport)...
But if I use
import requests proxies = {"http": 'http://host:8080', "https": 'http://host:8080'} auth = requests.auth.HTTPProxyAuth('user', 'pass*') r = requests.get('http://schemas.xmlsoap.org/soap/encoding/', proxies=proxies, auth=auth) print(r.status_code, r.reason)
ir returns 200 OK. Thanks for your help.