teamnet_axel: use bytes reponse content as suds requires (#44473)
This reverts commit ee615d34d2
.
This commit is contained in:
parent
c39d864800
commit
d0f2626617
|
@ -17,7 +17,7 @@
|
|||
# borrowed from https://pypi.python.org/pypi/suds_requests
|
||||
# and https://docs.oracle.com/cd/E50245_01/E50253/html/vmprg-soap-example-authentication-python.html
|
||||
|
||||
from django.utils.six import StringIO
|
||||
from django.utils.six import BytesIO
|
||||
from suds.transport.http import HttpAuthenticated
|
||||
from suds.transport import Reply
|
||||
from suds.client import Client
|
||||
|
@ -43,14 +43,14 @@ class Transport(HttpAuthenticated):
|
|||
resp = self.model.requests.get(
|
||||
request.url, headers=request.headers,
|
||||
**self.get_requests_kwargs())
|
||||
return StringIO(resp.text)
|
||||
return BytesIO(resp.content)
|
||||
|
||||
def send(self, request):
|
||||
self.addcredentials(request)
|
||||
resp = self.model.requests.post(
|
||||
request.url, data=request.message,
|
||||
headers=request.headers, **self.get_requests_kwargs())
|
||||
result = Reply(resp.status_code, resp.headers, resp.text)
|
||||
result = Reply(resp.status_code, resp.headers, resp.content)
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue