diff --git a/states/_modules/syncthing.py b/states/_modules/syncthing.py index 9ab84a5..cc71230 100644 --- a/states/_modules/syncthing.py +++ b/states/_modules/syncthing.py @@ -63,9 +63,10 @@ def insync(url, verify, apikey): def restart(url, verify, apikey): fullurl = f"{url}/rest/system/restart" try: - req = requests.post(fullurl, - verify=verify, - headers={"X-API-Key": apikey}) + req = requests.request("post", + fullurl, + verify=verify, + headers={"X-API-Key": apikey}) except (requests.exceptions.RequestException) as exc: raise f"Exception {exc} occured" if req.status_code == 200: