コード例 #1
0
async def extra_args_controller(name: str, **kwargs: Any) -> Response:
    return text(hello(kwargs['extra']), name=name)
コード例 #2
0
async def post_execution_middleware_controller(name: str) -> Response:
    return text(body=hello(name))
コード例 #3
0
async def background_tasks_controller(name: str) -> Response:
    return text(
        f'Hello {name}!\n{name} are the #{HelloCounter.counter}!',
        background_tasks=HelloCounter.count,
    )
コード例 #4
0
async def plaintext():
    return text('Hello, world!')