Skip to main content

request_response

Takes a function or coroutine func(request) - > response, and returns an ASGI application.

def request_response(
func: Callable[[Request], Awaitable[Response] | Response]
) - > ASGIApp

Takes a function or coroutine func(request) - > response, and returns an ASGI application.

Parameters

NameTypeDescription
func`Callable[[Request], Awaitable[Response]Response]`

Returns

TypeDescription
ASGIAppAn ASGI application that can be served by an ASGI server.