MCPcopy
hub / github.com/masterking32/MasterHttpRelayVPN / _send_json

Method _send_json

apps_script/vps_exit_node.py:222–228  ·  view source on GitHub ↗
(self, status: int, obj: dict)

Source from the content-addressed store, hash-verified

220 pass
221
222 def _send_json(self, status: int, obj: dict) -> None:
223 body = json.dumps(obj).encode()
224 self.send_response(status)
225 self.send_header("Content-Type", "application/json")
226 self.send_header("Content-Length", str(len(body)))
227 self.end_headers()
228 self.wfile.write(body)
229
230 def do_GET(self): # noqa: N802
231 """Health-check endpoint — returns a friendly JSON status."""

Callers 2

do_GETMethod · 0.95
do_POSTMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected