diff options
author | kaihlavi <l.kaihlavirt@partner.samsung.com> | 2019-06-06 11:08:57 +0300 |
---|---|---|
committer | kaihlavi <l.kaihlavirt@partner.samsung.com> | 2019-06-06 11:18:21 +0300 |
commit | 0932c69548b13eab93f46e81f939dec2803cd741 (patch) | |
tree | 605a4bf668fce94806a743c8809d19e3aba5d448 | |
parent | 6a3fad82a1b545038c2372da718714038b5aa664 (diff) |
Improve URL encoding
Change URL encoding to apply percent-encoding also to spaces
(which are currently converted to plus characters)
Corrected also too specific disable_warnings method documentation
Issue-ID: TEST-162
Signed-off-by: kaihlavi <l.kaihlavirt@partner.samsung.com>
Change-Id: Iac253533905755955236e72e292cff2e49180034
-rw-r--r-- | robotframework-onap/eteutils/HTTPUtils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/robotframework-onap/eteutils/HTTPUtils.py b/robotframework-onap/eteutils/HTTPUtils.py index c24ebf4..f5c8fe4 100644 --- a/robotframework-onap/eteutils/HTTPUtils.py +++ b/robotframework-onap/eteutils/HTTPUtils.py @@ -8,11 +8,11 @@ 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.parse.quote_plus(barestring) + """URL Encode String takes in a string and converts it into fully 'percent-encoded' string""" + return urllib.parse.quote(barestring) def disable_warnings(self): - """ Disable the cert warnings when creating sessions for A&AI API Calls """ + """ Disable all warnings when creating sessions """ urllib3.disable_warnings() def url_parse(self, url): |