MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / send_json

Method send_json

e2e/mcp-conformance/host-bridge.py:106–113  ·  view source on GitHub ↗
(self, status: int, body: dict[str, object])

Source from the content-addressed store, hash-verified

104 self.connection.settimeout(REQUEST_BODY_TIMEOUT_SECONDS)
105
106 def send_json(self, status: int, body: dict[str, object]) -> None:
107 encoded = json.dumps(body).encode("utf-8")
108 self.send_response(status)
109 self.send_header("content-type", "application/json")
110 self.send_header("content-length", str(len(encoded)))
111 self.send_header("connection", "close")
112 self.end_headers()
113 self.wfile.write(encoded)
114
115 def reject(self, status: int, detail: str) -> None:
116 self.close_connection = True

Callers 2

rejectMethod · 0.95
do_POSTMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected