From fc42c08038a14ac6594f7f09b5039eed787cdd7d Mon Sep 17 00:00:00 2001 From: Carlos Romero <98657335+carom93@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:29:47 -0600 Subject: [PATCH] Modify response handling in deploy_to_wazuh.py Change return value to response text instead of JSON. --- deploy_to_wazuh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deploy_to_wazuh.py b/deploy_to_wazuh.py index f39a96d..c33fd8d 100644 --- a/deploy_to_wazuh.py +++ b/deploy_to_wazuh.py @@ -22,9 +22,8 @@ def get_token(): params={"raw": "true"} ) print(f"🔍 Response status: {response.status_code}") - print(f"🔍 Response body: {response.text}") response.raise_for_status() - return response.json()["data"]["token"] + return response.text.strip() def upload_file(token, endpoint, filename, content): headers = {