diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-12-18 05:34:28 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-12-18 05:34:28 +0300 |
commit | 9c5da6f50b850596cca867c1cca0dae17750dc1c (patch) | |
tree | d7778b533ddf5f52a331ab95372cd5f19e2d83f6 /src/home/http/http.py | |
parent | 9af0e28b94fd44d2340b0b9ddf2dcccc11d48271 (diff) |
http: support PUT and DELETE in HTTPServer
Diffstat (limited to 'src/home/http/http.py')
-rw-r--r-- | src/home/http/http.py | 6 |
1 files changed, 6 insertions, 0 deletions
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() |