async def response_example(req: Request) -> TextResponse: if req.method == "DELETE": res = TextResponse("Hello, world!") res.headers.append(del_cookie("cookie-1")) return res return TextResponse("Hello, world!", headers=[set_cookie("cookie-1", "abc")])
async def other_methods(req: Request) -> TextResponse: return TextResponse(req.method)
async def welcome_methods(req: Request) -> TextResponse: return TextResponse(req.method)
async def root(req: Request) -> TextResponse: return TextResponse(req.method)
async def with_request_ret_asgi(req: Request) -> ASGICallable: return TextResponse("Hello, world!")
async def with_request(req: Request) -> TextResponse: return TextResponse("Hello, world!")
async def root() -> TextResponse: return TextResponse("Hello, world!")
async def root() -> TextResponse: return TextResponse("root")