MCPcopy Create free account
hub / github.com/adafruit/Adafruit_CircuitPython_HTTPServer / _send

Method _send

adafruit_httpserver/response.py:117–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 self._send_bytes(self._request.connection, response_message_header.encode("utf-8"))
116
117 def _send(self) -> None:
118 encoded_body = self._body.encode("utf-8") if isinstance(self._body, str) else self._body
119
120 self._send_headers(len(encoded_body), self._content_type)
121 self._send_bytes(self._request.connection, encoded_body)
122 self._close_connection()
123
124 def _send_bytes(
125 self,

Callers 1

pollMethod · 0.45

Calls 3

_send_headersMethod · 0.95
_send_bytesMethod · 0.95
_close_connectionMethod · 0.95

Tested by

no test coverage detected