blob: 40f999850b3406b4ccf04e4a80d671558974e941 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from six.moves import urllib
from robot.api.deco import keyword
class HTTPKeywords(object):
"""HTTPKeywords is common resource for simple http helper keywords."""
def __init__(self):
super(HTTPKeywords, self).__init__()
@keyword
def url_encode_string(self, barestring):
"""URL Encode String takes in a string and converts it into fully 'percent-encoded' string"""
return urllib.parse.quote(barestring)
@keyword
def url_parse(self, url):
""" Get pieces of the URL """
return urllib.parse.urlparse(url)
|