0.12.35 fix webpush

This commit is contained in:
SDE
2024-04-15 17:19:12 +03:00
parent fd70e388a7
commit 698f4578fc
3 changed files with 41 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
import requests
def ping():
req_str = f'https://developerhub.alfabank.by:8273/partner/1.0.1/public/nationalRates{code_str}{date_str}'
data = {}
headers = {
'content-type': 'application/json'
}
try:
msg = f'GET {req_str}'
print(msg)
res = requests.get(req_str, data=data, headers=headers)
msg = f'answer received = {str(res)}'
print(msg)
except Exception as e:
msg = f'Exception GET {req_str} = {str(e)} ({str(res)})'
print(msg)
res = None