I\'m using python-request on Google App Engine and it\'s not working as expected for HTTPS. Let\'s see an example:
import requests
requests.get(\'https://www
Downgrading to requests==2.1.0 worked for me.
Having an up-to-date urllib3 is important for resolving an unrelated bug (import pwd
, as I recall).
Hopefully App Engine fixes this soon, as requests won't.
EDIT:
I think you can also patch this in the latest requests by commenting lines 161-175 in sessions.py. Untested.
There is now a better solution than changing your requests
version. As suggested in the official docs you can monkey patch requests
to play nicely with Google App Engine.
First install requests-toolbelt:
pip install -t lib requests-toolbelt
Then in your main.py
file (or equivalent):
import requests_toolbelt.adapters.appengine
requests_toolbelt.adapters.appengine.monkeypatch()