def send_body(self, body):
"""Send the body
:param body:
:return: A tuple in the form
``(:class:`~xml.dom.minidom.Element`, String)``
"""
out = body.toxml()
response = \
self.request_session.post(
self.bosh_service.geturl(),
data=out)
if response.status_code == 200:
data = response.text
else:
data = ''
doc = minidom.parseString(data)
return (doc.documentElement, data)
评论列表
文章目录