python requests 请求https加固的ES

 

https ca + key + password

session = requests.Session()
session.mount('https://', SSLAdapter(certfile, keyfile, password))
session.get(url)

 

http auth认证 user password 

session.get(...., auth=('user', 'password'))

  

posted @ 2020-09-18 21:41  一支小白  阅读(643)  评论(0编辑  收藏  举报