MCPcopy Create free account
hub / github.com/apache/thrift / open

Method open

lib/py/src/transport/THttpClient.py:110–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 return self.realhost is not None
109
110 def open(self):
111 if self.scheme == 'http':
112 self.__http = http.client.HTTPConnection(self.host, self.port,
113 timeout=self.__timeout)
114 elif self.scheme == 'https':
115 self.__http = http.client.HTTPSConnection(self.host, self.port,
116 timeout=self.__timeout,
117 context=self.context)
118 if self.using_proxy():
119 self.__http.set_tunnel(self.realhost, self.realport,
120 {"Proxy-Authorization": self.proxy_auth})
121
122 def close(self):
123 self.__http.close()

Callers 1

flushMethod · 0.95

Calls 1

using_proxyMethod · 0.95

Tested by

no test coverage detected