@tornado.web.asynchronous
def test_push_data2(self):
client = tornado.httpclient.AsyncHTTPClient()
data = {"data_test":"1"}
data_send = urllib.urlencode(data)
url = "http://127.0.0.1:8080"
response = client.fetch(url, method='POST', body=data_send, callback = self.test_push_data2_resp)
def test_push_data2_resp(self, resp):
writelog("test_push_data2_resp 2, %s" % repr(resp.body))
self.finish()
def test_push_data2(self):
client = tornado.httpclient.AsyncHTTPClient()
data = {"data_test":"1"}
data_send = urllib.urlencode(data)
url = "http://127.0.0.1:8080"
response = client.fetch(url, method='POST', body=data_send, callback = self.test_push_data2_resp)
def test_push_data2_resp(self, resp):
writelog("test_push_data2_resp 2, %s" % repr(resp.body))
self.finish()