尝试使用以下代码通过python请求执行REST GET,我得到了错误。
代码剪:
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)
错误:
/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
我的python版本是2.7.3。我尝试安装urllib3和请求[安全]作为一些其他线程建议,我仍然得到相同的错误。
不知道是否有人能提供一些建议?