set verify in session request to VERIFY_SSL setting if it is not None, otherwise default to True.
@@ -81,6 +81,7 @@ class HttpTransportMixin(object):
request_headers = self._get_headers(headers=headers)
timeout = timeout if timeout is not None else settings.LONG_REQUEST_TIMEOUT
session = session or self.session
+ verify = settings.VERIFY_SSL if settings.VERIFY_SSL is not None else True
try:
response = session.request(method,
@@ -90,7 +91,8 @@ class HttpTransportMixin(object):
json=json,
headers=request_headers,
files=files,
- timeout=timeout)
+ timeout=timeout,
+ verify=verify)
except (requests.exceptions.RequestException,
requests.exceptions.Timeout,
requests.exceptions.HTTPError) as exception:
