Esempio n. 1
0
class UserAgentClient(object):
    def __init__(self, host, port):
        endpoint = "http://" + host + ":" + str(port)
        self.cli = HTTPClient(endpoint, token= lambda : None)

    def send_samples(self,samples):
        url = "/push"
        resp, body = self.cli.json_request("POST", url, body=samples)
        return resp, body
Esempio n. 2
0
 def __init__(self, host, port):
     endpoint = "http://" + host + ":" + str(port)
     self.cli = HTTPClient(endpoint, token= lambda : None)