Open daeeros opened 2 years ago
Since version 0.20.0, httpx no longer follows 3XX redirects in its requests, and instead will raise_for_status()
on ANY response that isn't a 2XX.
In order to fix it you have to pass in the follow_redirects=True
parameter to your client. This is how I'm doing it:
def client_init(ip, wtype):
SOAP_USER = "MyUser"
SOAP_PASSWORD = "MyPass"
ENDPOINT = 'http://{}:8169/_common/webservices/{}?wsdl'.format(ip, wtype)
wsdl_client = httpx.Client(auth=(SOAP_USER, SOAP_PASSWORD), follow_redirects=True)
HAAC = httpx.AsyncClient(auth=(SOAP_USER, SOAP_PASSWORD))
client = zeep.AsyncClient(
wsdl=ENDPOINT,
transport=AsyncTransport(
client=HAAC,
wsdl_client=wsdl_client,
operation_timeout=60,
cache=InMemoryCache()
)
)
client.settings.xml_huge_tree = True
return client
I have this code, but when its try auth, i getting this errror: Traceback (most recent call last):
How can i fix it?