test Header for basic auths
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user