Issue
I have to call a api(requests.post(https://192.168.16.10:8443/api/data,json=data)
) in my django .
It's https
,so I install django-sslserver
to run django with https
But I got error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
What else should I set??
I try to call https://192.168.16.10:8443/api/data
directly by Postman
, It works well.
It's the django problem
Solution
If you are using a self-signed certificate you can skip certificate verification:
requests.post("https://192.168.16.10:8443/api/data", verify=False)
See requests
documentation on SSL verification for details.
Warning: This will reduce the security of SSL as @KlausD pointed out and should be used as a last resort.
Answered By - Selcuk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.