diff --git a/scouter/activities/api.py b/scouter/activities/api.py index 21efcd7..3321959 100644 --- a/scouter/activities/api.py +++ b/scouter/activities/api.py @@ -58,6 +58,12 @@ class API(SientiaMonitoring): logger=logger, notification_handler=notification_handler, metrics_controller=metrics_controller, + headers_config={ + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'x-requested-with': 'piwebapistreams', + 'User-Agent': 'Aig-Scouter-Agent/1.0', + }, ) def close(self) -> None: diff --git a/tests/activities/test_api.py b/tests/activities/test_api.py index dbfbd2e..1386ee7 100644 --- a/tests/activities/test_api.py +++ b/tests/activities/test_api.py @@ -67,6 +67,12 @@ def test_api_initialization(mock_pi_web_api_client): logger=logger, notification_handler=notification_handler, metrics_controller=metrics_controller, + headers_config={ + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'x-requested-with': 'piwebapistreams', + 'User-Agent': 'Aig-Scouter-Agent/1.0', + }, ) assert activity.pi_web_api_client is not None