def __init__(self,
route_table: Dict[str, Tuple[str, Any]],
config: Dict[str, str],
renderer, *args: Any) -> None:
"""
Create a new request handler.
:param route_table: A dict with route information, the key is the route
as string and the value is a tuple containing the http verb and the
action to be executed when the route is requested.
"""
self._route_table = route_table
self._resolver = RouteResolver(route_table)
self._config = config
self._renderer = renderer
self._static_regex = re.compile('[/\w\-\.\_]+(?P<ext>\.\w{,4})$',
re.IGNORECASE | re.DOTALL)
BaseHTTPRequestHandler.__init__(self, *args)
mimetypes.init()
评论列表
文章目录