The post is working properly at postman. But when postman genereate a python code. I've got the following error:
SSLError: HTTPSConnectionPool(host='169.128.117.200', port=50000): Max retries exceeded with url: /b1s/v1/login (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)')))
I just can't understand why postman is working and, the python code is not...
What should I fix at the code to get it working?
import requests
import json
url = "https://169.128.117.200:50000/b1s/v1/login"
payload = json.dumps({
"Company": "aaaa",
"Password": "bbbb",
"UserName": "cccc"
})
headers = {
'Content-Type': 'application/json',
'Cookie': 'B1SESSION=230f61c2-d037-11eb-8000-fa163eb6380a; Company=aaaa; ROUTEID=.node2'
}
response=requests.post(url, data=json.dumps(payload), headers=headers)
print(response)