Esempio n. 1
0
 def createTransport(self, url, update_headers=None, service=None):
     if(update_headers is not None):
         self.headers.update(update_headers)
     transport 	= THttpClient(url)
     transport.setCustomHeaders(self.headers)
     protocol 	= TCompactProtocol.TCompactProtocol(transport)
     client 		= service(protocol)
     return client
Esempio n. 2
0
    def Liff(self, isopen=True):
        self.transport = THttpClient(self.host)
        self.transport.setCustomHeaders(self.headers)

        self.protocol = TCompactProtocol(self.transport)
        self._liff = LiffService.Client(self.protocol)

        if isopen:
            self.transport.open()

        return self._liff
Esempio n. 3
0
    def Call(self, isopen=True):
        self.transport = THttpClient(self.host)
        #        self.transport = THttpClient.THttpClient(self.host)
        self.transport.setCustomHeaders(self.headers)

        self.protocol = TCompactProtocol(self.transport)
        self._call = CallService.Client(self.protocol)

        if isopen:
            self.transport.open()

        return self._call