diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-02-05 01:38:27 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-02-05 02:37:52 +0300 |
commit | 378c912dd52072ed0dc86f00c4b4483bda615096 (patch) | |
tree | 73cb1482ed7838f3f827028d30daabb9edde8c27 /src/home | |
parent | 110f1619acbeb50ed86fb5eecde364ac99e45dff (diff) |
ipcam_server: centralized config, universal workers
Diffstat (limited to 'src/home')
-rw-r--r-- | src/home/http/http.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/home/http/http.py b/src/home/http/http.py index 76197d2..3e70751 100644 --- a/src/home/http/http.py +++ b/src/home/http/http.py @@ -2,6 +2,7 @@ import logging import asyncio from aiohttp import web +from aiohttp.web import Response from aiohttp.web_exceptions import HTTPNotFound from ..util import stringify, format_tb, Addr @@ -99,4 +100,7 @@ class HTTPServer: event_loop.run_forever() def ok(self, data=None): - return ok(data)
\ No newline at end of file + return ok(data) + + def plain(self, text: str): + return Response(text=text, content_type='text/plain') |