Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions src/zeep/transports.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,18 @@ def __init__(
raise RuntimeError("The AsyncTransport is based on the httpx module")

self.cache = cache
self.wsdl_client = wsdl_client or httpx.Client()
self.client = client or httpx.AsyncClient()
self.load_timeout = timeout
self.operation_timeout = operation_timeout
self.wsdl_client = wsdl_client or httpx.Client(
verify=verify_ssl,
proxies=proxy,
timeout=timeout,
)
self.client = client or httpx.AsyncClient(
verify=verify_ssl,
proxies=proxy,
timeout=operation_timeout,
)
self.logger = logging.getLogger(__name__)

self.verify_ssl = verify_ssl
self.proxy = proxy
self.wsdl_client.headers = {
"User-Agent": "Zeep/%s (www.python-zeep.org)" % (get_version())
}
Expand All @@ -198,7 +202,7 @@ async def aclose(self):
await self.client.aclose()

def _load_remote_data(self, url):
response = self.wsdl_client.get(url, timeout=self.load_timeout)
response = self.wsdl_client.get(url)
result = response.read()

try:
Expand All @@ -213,9 +217,6 @@ async def post(self, address, message, headers):
address,
data=message,
headers=headers,
# verify=self.verify_ssl,
# proxy=self.proxy,
timeout=self.operation_timeout,
)
self.logger.debug(
"HTTP Response from %s (status: %d):\n%s",
Expand All @@ -235,9 +236,6 @@ async def get(self, address, params, headers):
address,
params=params,
headers=headers,
verify_ssl=self.verify_ssl,
proxy=self.proxy,
timeout=self.operation_timeout,
)
return self.new_response(response)

Expand Down