Agent: Use `json` instead of `data` in POST request in send_all_events_to_island.py

This commit is contained in:
Shreya Malviya 2022-09-13 19:35:44 +05:30
parent 4381716e54
commit a561195508
1 changed files with 1 additions and 2 deletions

View File

@ -76,8 +76,7 @@ class send_all_events_to_island:
try: try:
requests.post( # noqa: DUO123 requests.post( # noqa: DUO123
EVENTS_API_URL % (self._server_address,), EVENTS_API_URL % (self._server_address,),
data=events, json=events,
headers={"content-type": "application/json"},
verify=False, verify=False,
timeout=MEDIUM_REQUEST_TIMEOUT, timeout=MEDIUM_REQUEST_TIMEOUT,
) )