src/flask/scaffold.py
def after_request(self, f: AfterRequestCallable) -> AfterRequestCallable:
        """Register a function to run after each request to this object.

        The function is called with the response object, and must return
        a response object. This allows the functions to modify or
        replace the response before it is sent.

        If a function raises an exception, any remaining
        ``after_request`` functions will not be called. Therefore, this
        should not be used for actions that must execute, such as to
        close resources. Use :meth:`teardown_request` for that.
        """
        self.after_request_funcs.setdefault(None, []).append(f)
        return f
Register a function to run after each request to this object.

        The function is called with the response object, and must return
        a response object. This allows the functions to modify or
        replace the response before it is sent.

        If a function raises an exception, any remaining
        ``after_request`` functions will not be called. Therefore, this
        should not be used for actions that must execute, such as to
        close resources. Use :meth:`teardown_request` for that.
        
Register a function to run after each request to this object.
The function is called with the response object, and must return
a response object. This allows the functions to modify or
replace the response before it is sent.

If a function raises an exception, any remaining
``after_request`` functions will not be called. Therefore, this
should not be used for actions that must execute, such as to
close resources. Use :meth:`teardown_request` for that.
Register a function to run after each request to this object . The function is called with the response object and must return a response object . This allows the functions to modify or replace the response before it is sent . If a function raises an exception any remaining ` ` after_request ` ` functions will not be called . Therefore this should not be used for actions that must execute such as to close resources . Use : meth : ` teardown_request ` for that .
def after_request(self, f: AfterRequestCallable) -> AfterRequestCallable:
        self.after_request_funcs.setdefault(None, []).append(f)
        return f
def after_request ( self , f : AfterRequestCallable ) -> AfterRequestCallable : self . after_request_funcs . setdefault ( None , [ ] ) . append ( f ) return f
Register a function to run after each request to this object.
Register a function to run after each request to this object .
"""Register a function to run after each request to this object.

        The function is called with the response object, and must return
        a response object. This allows the functions to modify or
        replace the response before it is sent.

        If a function raises an exception, any remaining
        ``after_request`` functions will not be called. Therefore, this
        should not be used for actions that must execute, such as to
        close resources. Use :meth:`teardown_request` for that.
        """
self
f
AfterRequestCallable