diff --git a/slow/slow.py b/slow/slow.py index b71856c..88e9c53 100644 --- a/slow/slow.py +++ b/slow/slow.py @@ -135,11 +135,20 @@ class App: return decorator - def OPTIONS(self, path: str): - """Decorator to register a OPTIONS HTTP route.""" + def PATCH(self, path: str): + """Decorator to register a PATCH HTTP route.""" def decorator(func: Callable[[Request, ...], Awaitable[bytes]]): - self._serve(path, "OPTIONS", func) + self._serve(path, "PATCH", func) + return func + + return decorator + + def HEAD(self, path: str): + """Decorator to register a HEAD HTTP route.""" + + def decorator(func: Callable[[Request, ...], Awaitable[bytes]]): + self._serve(path, "HEAD", func) return func return decorator