20 lines
466 B
Python
20 lines
466 B
Python
from bugis.core import BugisApp, HttpContext
|
|
|
|
|
|
class Hello(BugisApp):
|
|
|
|
async def handle_request(self, ctx: HttpContext) -> None:
|
|
async for chunk in ctx.request_body:
|
|
print(chunk)
|
|
await ctx.send_str(200, 'Hello World')
|
|
|
|
|
|
app = BugisApp()
|
|
|
|
|
|
@app.GET('/hello')
|
|
@app.GET('/hello2')
|
|
async def handle_request(ctx: HttpContext) -> None:
|
|
async for chunk in ctx.request_body:
|
|
print(chunk)
|
|
await ctx.send_str(200, 'Hello World') |