Closed jlab13 closed 5 years ago
Hey!
I've never used Requests with a self-signed certificate, but you're right -- it looks like it should be possible using prepared requests.
Requester's parser previously didn't support prepared requests, but I just pushed a new version that fixes that. To use a session, you can just instantiate it in your env block and then reference it outside of the env block.
###env
import requests
import os
os.environ['REQUESTS_CA_BUNDLE'] = 'blablabla'
s = requests.Session()
req = requests.Request('GET', 'https://www.google.com')
prepped = s.prepare_request(req)
# Merge environment settings into session
settings = s.merge_environment_settings(prepped.url, None, None, None, None)
###env
s.send(prepped, **settings)
Go ahead and try something like this, and see if you can get it working!
@jlab13
Did you get a chance to try this?
How to use Self-signed SSL certificates?
I think maybe need add setting for use Session.merge_environment_settings?