解决抓包工具与pycharm发送https请求冲突问题

 

1、开启charles,运行pycharm发送https请求报以下错误
 

 

 2、发送请求时,加上verify=False,即可解决

response = requests.post(url, headers=headers, params=data, verify=False)

3、再次运行会报如下提示:

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

4、为了不让报提示,加上如下2行代码,即可解决

import urllib3
urllib3.disable_warnings()
 
posted @ 2020-03-24 18:06  &阿岩  Views(1897)  Comments(0Edit  收藏  举报