SSLError: HTTPSConnectionPool(host='xx.xxx.com', port=443): Max retries exceeded with url: /api/v1/service/xxx (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))
解决方案如下:
requests请求时关闭ssl验证即可 添加参数verify=False
文章来源地址https://www.toymoban.com/news/detail-818836.html
url = 'https://api.chatxxx.com/api/v1/service/xxx'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxxxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload,verify=False)
print(response.text)
文章来源:https://www.toymoban.com/news/detail-818836.html
到了这里,关于python requests请求报错Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED]的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!