def do_GET(self) -> None: request_path = self.path if self.path == "/": self.return_k_json({"ciao": "mondo"}) if request_path.startswith("/get"): key = self.parse_path(request_path) # action performed within the web app here self.return_k_json({"jars": key["key"]}) self.send_response(200) else: self.bad_request() self.end_headers()