def _call(self, base_url, url, body):
"""Open a network connection and performs HTTP Post
with provided body.
"""
# Combines the "base_url" with the
# required "url" to be used for the specific request.
url = urljoin(base_url.geturl(), url)
headers = {'User-Agent': 'Lightstreamer iOS client/1.2.7'}
req = Request(url)
for k, v in headers.items():
req.add_header(k, v)
return urlopen(req, data=self._encode_params(body))
评论列表
文章目录