diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py index f8767ba1ac3..624093294ed 100644 --- a/aiohttp/web_urldispatcher.py +++ b/aiohttp/web_urldispatcher.py @@ -78,7 +78,7 @@ def __init__(self, method, handler, *, 'Coroutine is expected, got {!r}'.format(expect_handler) method = method.upper() - if not self.validate_method(method): + if not HTTP_METHOD_RE.match(method): raise ValueError("{} is not allowed HTTP method".format(method)) assert callable(handler), handler @@ -105,9 +105,6 @@ def handler_wrapper(*args, **kwargs): self._expect_handler = expect_handler self._resource = resource - def validate_method(self, method): - return HTTP_METHOD_RE.match(method) - @property def method(self): return self._method