test Header for basic auths

This commit is contained in:
CHIEFSOFT\ameye
2025-04-05 21:14:03 -04:00
parent 3a30e0abff
commit 30233b7283
+8 -2
View File
@@ -35,10 +35,16 @@ class SimbrellaIntegration:
}
logger.error(f"This is PayLoad: {str(payload)}",exc_info=True)
auth = HTTPBasicAuth(settings.VALID_APP_ID, settings.VALID_API_KEY)
# auth = HTTPBasicAuth(settings.VALID_APP_ID, settings.VALID_API_KEY)
headers = {
'Content-Type': 'application/json',
'x-api-key': f'{settings.VALID_API_KEY}',
'App-Id': f'{settings.VALID_APP_ID}'
}
try:
response = requests.post(url, json=payload, timeout=10, auth=auth)
response = requests.post(url, json=payload, timeout=10, headers=headers)
logger.error(f"This is Response: {str(response)}", exc_info=True)
# Raise an error for non-200 responses
response.raise_for_status()