Skip to content
Snippets Groups Projects
Commit f2943b86 authored by Moritz Maas's avatar Moritz Maas
Browse files

chore: get webinterface from main

parent 0e2a1c15
Branches test-moritz
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@ class HTTPHandler:
_UPDATE_ENDPOINT = "/api/update"
_CONTENT_TYPE = "application/json"
_MAX_TIMEOUT = 10
__slots__ = ("_url",)
def __init__(self):
......@@ -51,8 +53,9 @@ class HTTPHandler:
try:
request_body = json.dumps({"body": {"message": msg}})
post(self._url, data = request_body, headers = {"Content-type": self._CONTENT_TYPE})
post(self._url, data = request_body,
headers = {"Content-type": self._CONTENT_TYPE},
timeout = self._MAX_TIMEOUT)
except ConnectionError:
pass
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment