增加范例

This commit is contained in:
zwf
2026-06-02 16:30:48 +08:00
parent 291e6fcaae
commit f4e7e1b3d2
26 changed files with 9578 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from paste.core.logging import echo_log
from paste.web.decorators import route
from paste.web.handler import RequestHandler
@route("/hello")
class HelloHandler(RequestHandler):
"""
演示一个请求。
"""
async def get(self):
"""
常规请求。
"""
echo_log(f"Received request!")
self.response_ok(message="Hello from paste!")