def http_handler(self, request):
path = request.path.split("/")[2]
logging.info("%s %s", request, path)
handler = getattr(self, "_http_%s" % path, None)
if handler:
return await handler(request)
return web.HTTPNotFound()
文章目录