summaryrefslogtreecommitdiffstats
path: root/eteutils/HTTPUtils.py
diff options
context:
space:
mode:
authorJerry Flood <jf9860@att.com>2017-04-21 16:32:33 -0400
committerJerry Flood <jf9860@att.com>2017-04-21 16:44:37 -0400
commit96e3d06bc97c9f357e5a74e3bee2cb6f509fadee (patch)
treefa4f47070a55b91750ba610378fba48d1b4f06a1 /eteutils/HTTPUtils.py
parent54ac69132e8632435668e50d3dda617d238e3f33 (diff)
[TEST-18] Add function to suppress cert warnings
Change-Id: I089debc2d8b736316443a53375a15e4791bef9bd Signed-off-by: Jerry Flood <jf9860@att.com>
Diffstat (limited to 'eteutils/HTTPUtils.py')
-rw-r--r--eteutils/HTTPUtils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/eteutils/HTTPUtils.py b/eteutils/HTTPUtils.py
index 9df3611..bca6b61 100644
--- a/eteutils/HTTPUtils.py
+++ b/eteutils/HTTPUtils.py
@@ -1,8 +1,13 @@
import urllib
+from requests.packages import urllib3
class HTTPUtils:
"""HTTPUtils is common resource for simple http helper keywords."""
-
+
def url_encode_string(self, barestring):
"""URL Encode String takes in a string and converts into 'percent-encoded' string"""
- return urllib.quote_plus(barestring) \ No newline at end of file
+ return urllib.quote_plus(barestring)
+
+ def disable_warnings(self):
+ """ Disable the cert warnings when creating sessions for A&AI API Calls """
+ urllib3.disable_warnings() \ No newline at end of file