Checking ssl cert traversal in python
although i keep checking = false i get ssl error in python. Could you please tell me how I can avoid this? But the curl command works with the -k option.
import json
import requests
url = "https://<url>/context"
payload = {"some":"data"}
headers = {"Authorization": "Basic:xxxxxxxxxx"}
response = requests.post(url, verify=False,
data=json.dumps(payload), headers=headers)
print(response)
Mistake:
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequest Warning: An unverified HTTPS request is in progress. Adding certificate validation is highly recommended. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning)
+3
source to share