moving http to new keyword format
[testsuite/python-testing-utils.git] / robotframework-onap / ONAPLibrary / HTTPKeywords.py
1 from six.moves import urllib
2 from robot.api.deco import keyword
3
4
5 class HTTPKeywords(object):
6     """HTTPKeywords is common resource for simple http helper keywords."""
7     def __init__(self):
8         super(HTTPKeywords, self).__init__()
9
10     @keyword
11     def url_encode_string(self, barestring):
12         """URL Encode String takes in a string and converts it into fully 'percent-encoded' string"""
13         return urllib.parse.quote(barestring)
14
15     @keyword
16     def url_parse(self, url):
17         """  Get pieces of the URL """
18         return urllib.parse.urlparse(url)