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(), ))
def do_GET(self) -> None: body = { "server_name": NAME_SERVER, "current_time": get_datetime_rfc822() } self.send_json(body)
def do_GET(self) -> None: name, = self.flexible_locs body = {"name": name, "datetime": get_datetime_rfc822()} self.send_json(body)