From a561195508ec617266b5b13c78f8fbac254c9ff8 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 13 Sep 2022 19:35:44 +0530 Subject: [PATCH] Agent: Use `json` instead of `data` in POST request in send_all_events_to_island.py --- monkey/infection_monkey/send_all_events_to_island.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/infection_monkey/send_all_events_to_island.py b/monkey/infection_monkey/send_all_events_to_island.py index 4e03a5239..cd3c449c1 100644 --- a/monkey/infection_monkey/send_all_events_to_island.py +++ b/monkey/infection_monkey/send_all_events_to_island.py @@ -76,8 +76,7 @@ class send_all_events_to_island: try: requests.post( # noqa: DUO123 EVENTS_API_URL % (self._server_address,), - data=events, - headers={"content-type": "application/json"}, + json=events, verify=False, timeout=MEDIUM_REQUEST_TIMEOUT, )