def match(self, path, method):
if path != '<STR_LIT:/>':<EOL><INDENT>path = path.rstrip('<STR_LIT:/>')<EOL><DEDENT>method = method.upper()<EOL>status = <NUM_LIT><EOL>for p, n, m in self.endpoints:<EOL><INDENT>matched, url_vars = match_path(p, path)<EOL>if not matched:  <EOL><INDENT>continue<EOL><DEDENT>if method not in m:  <EOL><INDENT>status = <NUM_LIT><EOL>raise HTTPError(status=status, body=f'<STR_LIT>')  <EOL><DEDENT>callback, type_hints = m[method]<EOL>type_matched, typed_url_vars = match_url_vars_type(url_vars, type_hints)<EOL>if not type_matched:<EOL><INDENT>continue  <EOL><DEDENT>return callback, typed_url_vars<EOL><DEDENT>raise HTTPError(status=status, body=f'<STR_LIT>')<EOL>
Get callback and url_vars.

        >>> from kobin import Response
        >>> r = Router()
        >>> def view(user_id: int) -> Response:
        ...     return Response(f'You are {user_id}')
        ...
        >>> r.add('/users/{user_id}', 'GET', 'user-detail', view)

        >>> callback, url_vars = r.match('/users/1', 'GET')
        >>> url_vars
        {'user_id': 1}
        >>> response = callback(**url_vars)
        >>> response.body
        [b'You are 1']

        >>> callback, url_vars = r.match('/notfound', 'GET')
        Traceback (most recent call last):
            ...
        kobin.responses.HTTPError