コード例 #1
0
    def do_GET(self):
        with open(self.path_img, "rb") as f:
            img = f.read()

        self.send_api(
            MockResponse(
                image=encode_binary(img),
                datetime=get_datetime_rfc822(),
            ))
コード例 #2
0
 def do_GET(self) -> None:
     body = {
         "server_name": NAME_SERVER,
         "current_time": get_datetime_rfc822()
     }
     self.send_json(body)
コード例 #3
0
 def do_GET(self) -> None:
     name, = self.flexible_locs
     body = {"name": name, "datetime": get_datetime_rfc822()}
     self.send_json(body)