aboutsummaryrefslogtreecommitdiff
path: root/src/home/http/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/home/http/http.py')
-rw-r--r--src/home/http/http.py6
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')