MCPcopy Create free account
hub / github.com/cppla/ServerStatus / end_headers

Method end_headers

server/manage_api.py:315–321  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

313 print("%s - %s" % (self.address_string(), fmt % args), flush=True)
314
315 def end_headers(self):
316 self.send_header("Cache-Control", "no-store")
317 if CORS_ORIGIN:
318 self.send_header("Access-Control-Allow-Origin", CORS_ORIGIN)
319 self.send_header("Access-Control-Allow-Headers", "Authorization, Content-Type, X-Admin-Token")
320 self.send_header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
321 super().end_headers()
322
323 def send_json(self, status, payload):
324 data = json.dumps(payload, ensure_ascii=False).encode("utf-8")

Callers 2

send_jsonMethod · 0.95
routeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected