diff options
| author | UltraQbik <no1skill@yandex.ru> | 2024-08-22 04:52:07 +0300 |
|---|---|---|
| committer | UltraQbik <no1skill@yandex.ru> | 2024-08-22 04:52:07 +0300 |
| commit | 45680d00a4a8ed288d2a78baddb5e7c7e2e95cef (patch) | |
| tree | e77424b1fe01bc935c993e357593946b9bd4216b /main.py | |
| parent | 9a539001f3f1e77a6ea8332f659695d7ddcedb2f (diff) | |
| download | httpy-45680d00a4a8ed288d2a78baddb5e7c7e2e95cef.tar.gz httpy-45680d00a4a8ed288d2a78baddb5e7c7e2e95cef.zip | |
API seems to work
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main.py b/main.py index dc80db6..0844fd7 100644 --- a/main.py +++ b/main.py @@ -216,6 +216,7 @@ class HTTPServer: # get API version api_version = request.path.split("/")[1] + data = b'' match api_version: case "APIv1": status, data = await APIv1.respond(client, request) @@ -225,6 +226,10 @@ class HTTPServer: # if status is not 200 -> send bad response if status != 200: await HTTPServer._bad_response(client, status) + return + + # send data if no error + await HTTPServer._send(client, status, data) # return after answer return |