werkzeug.BaseRequest.application

classmethod BaseRequest.application(f)[source]

Decorate a function as responder that accepts the request as first argument. This works like the responder() decorator but the function is passed the request object as first argument and the request object will be closed automatically:

@Request.application
def my_wsgi_app(request):
    return Response('Hello World!')
Parameters:f – the WSGI callable to decorate
Returns:a new WSGI callable