编程语言
首页 > 编程语言> > python中请求https请求

python中请求https请求

作者:互联网

在请求的时候加上 verify=False 即可


if method == METHOD_GET:
res = requests.get(url=url, headers=headers, verify=False)
elif method == METHOD_POST:
res = requests.post(url=url, json=data, headers=headers, verify=False)
elif method == METHOD_PUT:
res = requests.put(url=url, json=data, headers=headers, verify=False)
elif method == METHOD_DELETE:
res = requests.delete(url=url, json=data, headers=headers, verify=False)

标签:False,请求,python,verify,method,headers,url,https,METHOD
来源: https://www.cnblogs.com/ivyJ/p/16348326.html