Set a instance method to be call as a wsgi application, adding common
    behavior and using webob.Request for practical use.


    @wsgi_handler
    def handle_verify_token(self, request):
        pass

    :param func:
    :return:

def wsgi_handler(func):
    """
    Set a instance method to be call as a wsgi application, adding common
    behavior and using webob.Request for practical use.


    @wsgi_handler
    def handle_verify_token(self, request):
        pass

    :param func:
    :return:
    """

    @wraps(func)
    def inner(*args):
        self, environ, start_response, *args = args
        request = Request(environ)

        try:
            response = func(self, request)
        except Exception as err:
            raise
        else:
            return response(environ, start_response)

    return inner