-
-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
I have this code:
class Tracker:
def __init__(self, login, password):
self.login = login
self.password = password
self.api_url = 'https://tracking.russianpost.ru/rtm34?wsdl'
httpx_client = httpx.AsyncClient(auth=(self.login, self.password))
self.client = zeep.AsyncClient(
self.api_url,
transport=AsyncTransport(client=httpx_client),
settings=zeep.Settings(strict=False, xml_huge_tree=True,)
)
async def get_history(self, barcode):
return await self.client.service.getOperationHistory(
OperationHistoryRequest={
'Barcode': barcode,
'MessageType': '0'
},
AuthorizationHeader={
'login': self.login,
'password': self.password,
},
)
But when it try to make auth, i getting error:
httpx.HTTPStatusError: Redirect response '302 Moved Temporarily' for url 'https://tracking.russianpost.ru/rtm34?wsdl'
Redirect location: 'https://tracking.russianpost.ru/tracking-web-static/rtm34_wsdl.xml'
For more information check: https://httpstatuses.com/302
How can if fix it?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested