fix: atualizar User-Agent para 1.0.1

This commit is contained in:
SantosFC 2026-06-07 14:39:36 -03:00
parent d1e128b7d4
commit 11bcf52a70

View file

@ -25,7 +25,7 @@ def load_config():
def ping(url: str, body: bytes, timeout: int) -> int: def ping(url: str, body: bytes, timeout: int) -> int:
req = urllib.request.Request( req = urllib.request.Request(
url, data=body, method="POST", url, data=body, method="POST",
headers={"User-Agent": "health-monitor/1.0", "Content-Type": "application/json"} headers={"User-Agent": "health-monitor/1.0.1", "Content-Type": "application/json"}
) )
with urllib.request.urlopen(req, timeout=timeout) as response: with urllib.request.urlopen(req, timeout=timeout) as response:
return response.getcode() return response.getcode()
@ -36,7 +36,7 @@ def ping_fail(url: str, body: bytes, timeout: int) -> None:
try: try:
req = urllib.request.Request( req = urllib.request.Request(
fail_url, data=body, method="POST", fail_url, data=body, method="POST",
headers={"User-Agent": "health-monitor/1.0", "Content-Type": "application/json"} headers={"User-Agent": "health-monitor/1.0.1", "Content-Type": "application/json"}
) )
urllib.request.urlopen(req, timeout=timeout) urllib.request.urlopen(req, timeout=timeout)
except Exception: except Exception: