MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / close

Method close

tools/python-3.11.9-amd64/Lib/http/client.py:974–986  ·  view source on GitHub ↗

Close the connection to the HTTP server.

(self)

Source from the content-addressed store, hash-verified

972 self._tunnel()
973
974 def close(self):
975 """Close the connection to the HTTP server."""
976 self.__state = _CS_IDLE
977 try:
978 sock = self.sock
979 if sock:
980 self.sock = None
981 sock.close() # close it manually... there may be other refs
982 finally:
983 response = self.__response
984 if response:
985 self.__response = None
986 response.close()
987
988 def send(self, data):
989 """Send `data' to the server.

Callers 2

_tunnelMethod · 0.95
getresponseMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected