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

Method do_GET

examples/private-ip-routing/server.py:13–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11
12class Handler(BaseHTTPRequestHandler):
13 def do_GET(self):
14 body = json.dumps(
15 {
16 "message": "Hello from the private network!",
17 "hostname": socket.gethostname(),
18 "path": self.path,
19 "client": self.client_address[0],
20 "timestamp": time.time(),
21 },
22 indent=2,
23 )
24 self.send_response(200)
25 self.send_header("Content-Type", "application/json")
26 self.end_headers()
27 self.wfile.write(body.encode())
28
29 def log_message(self, fmt, *args):
30 print(f"[{self.log_date_time_string()}] {fmt % args}")

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected