MCPcopy Index your code
hub / github.com/codenameone/CodenameOne / do_GET

Method do_GET

scripts/javascript_browser_harness.py:141–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

139 sys.stderr.write("[javascript-browser-harness] " + (fmt % args) + "\n")
140
141 def do_GET(self) -> None:
142 if self.path == "/__cn1__/probe.js":
143 payload = PROBE_JS.encode("utf-8")
144 self.send_response(200)
145 self.send_header("Content-Type", "application/javascript; charset=utf-8")
146 self.send_header("Content-Length", str(len(payload)))
147 self.end_headers()
148 self.wfile.write(payload)
149 return
150 if self.path == "/__cn1__/health":
151 payload = json.dumps({"ready": True}).encode("utf-8")
152 self.send_response(200)
153 self.send_header("Content-Type", "application/json; charset=utf-8")
154 self.send_header("Content-Length", str(len(payload)))
155 self.end_headers()
156 self.wfile.write(payload)
157 return
158 super().do_GET()
159
160 def do_POST(self) -> None:
161 if self.path != "/__cn1__/log":

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected