summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/eteutils/HTTPUtils.py
diff options
context:
space:
mode:
Diffstat (limited to 'robotframework-onap/eteutils/HTTPUtils.py')
-rw-r--r--robotframework-onap/eteutils/HTTPUtils.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/robotframework-onap/eteutils/HTTPUtils.py b/robotframework-onap/eteutils/HTTPUtils.py
new file mode 100644
index 0000000..9324af7
--- /dev/null
+++ b/robotframework-onap/eteutils/HTTPUtils.py
@@ -0,0 +1,18 @@
+import urllib
+import urllib3
+import urlparse
+
+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)
+
+ def disable_warnings(self):
+ """ Disable the cert warnings when creating sessions for A&AI API Calls """
+ urllib3.disable_warnings()
+
+ def url_parse(self, url):
+ """ Get pieces of the URL """
+ return urlparse.urlparse(url) \ No newline at end of file