SIENTIAPDE-1478
Enhance API class with default headers for JSON requests - Added a headers configuration to the API class to specify default Content-Type, Accept, x-requested-with, and User-Agent for JSON requests.
This commit is contained in:
@@ -63,6 +63,12 @@ class API(SientiaMonitoring):
|
|||||||
logger=logger,
|
logger=logger,
|
||||||
notification_handler=notification_handler,
|
notification_handler=notification_handler,
|
||||||
metrics_controller=metrics_controller,
|
metrics_controller=metrics_controller,
|
||||||
|
headers_config={
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'x-requested-with': 'piwebapistreams',
|
||||||
|
'User-Agent': 'Aig-Laborious-Agent/1.0',
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def close(self) -> None:
|
def close(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user