本文整理汇总了Python中suds.transport.http.HttpTransport.send方法的典型用法代码示例。如果您正苦于以下问题:Python HttpTransport.send方法的具体用法?Python HttpTransport.send怎么用?Python HttpTransport.send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类suds.transport.http.HttpTransport
的用法示例。
在下文中一共展示了HttpTransport.send方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: send
# 需要导入模块: from suds.transport.http import HttpTransport [as 别名]
# 或者: from suds.transport.http.HttpTransport import send [as 别名]
def send(self, request):
self.addcredentials(request)
r = XMLParser.parse(request.message.decode('ascii'))
data = dump_records(r)
request.message = data
request.headers['Content-Type'] = 'application/soap+msbin1'
# request.message = request.message()
return HttpTransport.send(self, request)
示例2: send
# 需要导入模块: from suds.transport.http import HttpTransport [as 别名]
# 或者: from suds.transport.http.HttpTransport import send [as 别名]
def send(self, request):
request.headers['Accept-encoding'] = 'gzip'
result = HttpTransport.send(self, request)
if ('content-encoding' in result.headers and
result.headers['content-encoding'] == 'gzip') :
buf = BytesIO(result.message)
f = gzip.GzipFile(fileobj=buf)
result.message = f.read()
return result
示例3: send
# 需要导入模块: from suds.transport.http import HttpTransport [as 别名]
# 或者: from suds.transport.http.HttpTransport import send [as 别名]
def send(self, request):
request.headers['Accept-encoding'] = 'gzip'
result = HttpTransport.send(self, request)
if result.headers['content-encoding'] == 'gzip':
try:
result.message = gzip.decompress(result.message)
except OSError:
pass
return result
示例4: send
# 需要导入模块: from suds.transport.http import HttpTransport [as 别名]
# 或者: from suds.transport.http.HttpTransport import send [as 别名]
def send(self, request):
self.addcredentials(request)
return HttpTransport.send(self, request)
示例5: send
# 需要导入模块: from suds.transport.http import HttpTransport [as 别名]
# 或者: from suds.transport.http.HttpTransport import send [as 别名]
def send(self, request):
return HttpTransport.send(self, request)