From 9c5da6f50b850596cca867c1cca0dae17750dc1c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 18 Dec 2022 05:34:28 +0300 Subject: http: support PUT and DELETE in HTTPServer --- src/home/http/http.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/home/http/http.py') diff --git a/src/home/http/http.py b/src/home/http/http.py index 8e9d3b2..76197d2 100644 --- a/src/home/http/http.py +++ b/src/home/http/http.py @@ -77,6 +77,12 @@ class HTTPServer: def post(self, path, handler): self._add_route('post', path, handler) + def put(self, path, handler): + self._add_route('put', path, handler) + + def delete(self, path, handler): + self._add_route('delete', path, handler) + def run(self, event_loop=None, handle_signals=True): if not event_loop: event_loop = asyncio.get_event_loop() -- cgit v1.2.3