'Dispatches a request.'

@werkzeug_wsgi.responder
def __call__(self, environ, start_response):

    request = self._BuildRequest(environ)
    matcher = self.routing_map.bind_to_environ(environ)
    try:
        (endpoint, _) = matcher.match(request.path, request.method)
        return endpoint(request)
    except werkzeug_exceptions.HTTPException as e:
        logging.exception('http    exception:    %s    [%s]', request.path, request.method)
        return e
