Fix valid method condition
This commit is contained in:
@@ -100,7 +100,7 @@ class App:
|
||||
method: str,
|
||||
func: Callable[[Request, ...], Awaitable[Response]],
|
||||
):
|
||||
if method not in ["GET", "POST", "PUT", "DELETE"]:
|
||||
if method not in ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"]:
|
||||
raise RuntimeError(f'Invalid method "{method}".')
|
||||
pat = self._pattern_to_regex(path)
|
||||
if pat not in self.routes:
|
||||
|
||||
Reference in New Issue
Block a user