How to get Python requests to trust a self signed SSL certificate?

前端 未结 7 2037
故里飘歌
故里飘歌 2020-11-27 15:07
import requests
data = {\'foo\':\'bar\'}
url = \'https://foo.com/bar\'
r = requests.post(url, data=data)

If the URL uses a self signed certificate,

相关标签:
7条回答
  • 2020-11-27 15:38

    try:

    r = requests.post(url, data=data, verify='/path/to/public_key.pem')
    
    0 讨论(0)
提交回复
热议问题