INNER CODE UNIT · Python

do_GET

yohey-w/multi-agent-shogun · scripts/dashboard-viewer.py:229

    def do_GET(self):
        if self.path == "/":
            self._serve_html()
        elif self.path == "/api/dashboard":
            self._serve_markdown()
        elif self.path == "/api/mtime":
            self._serve_mtime()
        else:
            self.send_error(404)

    def _serve_html(self):
        body = HTML_TEMPLATE.encode("utf-8")
        self.send_response(200)
        self.send_header("Content-Type", "text/html; charset=utf-8")
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…