This question already has an answer here:
- SSL InsecurePlatform error when using Requests package 14 answers
Tried to perform REST GET through python requests with the following code and I got error.
Code snip:
import requests
header = {\'Authorization\': \'Bearer...\'}
url = az_base_url + az_subscription_id + \'/resourcegroups/Default-Networking/resources?\' + az_api_version
r = requests.get(url, headers=header)
Error:
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
My python version is 2.7.3. I tried to install urllib3 and requests[security] as some other thread suggests, I still got the same error.
Wonder if anyone can provide some tips?