Closed achernevskii closed 3 years ago
{'array_option': ['value1', 'value2']}
...?array_option=%5B%27value1%27%2C+%27value2%27%5D
...?array_option=value1&array_option=value2
Added doseq=True parameter to Connector's _urlencode method call.
doseq=True
Connector
_urlencode
Now arrays in query params will be URL-encoded as a set of key/value pairs. Each key/value will represent an entry in the respective array.
This will make array-search possible.
Closes #280.
test_construct_url_with_query_params_containing_array
_construct_url
@anagha-infoblox, @somashekhar
@anagha-infoblox, @somashekhar please take a look.
Issue Description
{'array_option': ['value1', 'value2']}
...?array_option=%5B%27value1%27%2C+%27value2%27%5D
{'array_option': ['value1', 'value2']}
...?array_option=value1&array_option=value2
How It Was Fixed
Added
doseq=True
parameter toConnector
's_urlencode
method call.Now arrays in query params will be URL-encoded as a set of key/value pairs. Each key/value will represent an entry in the respective array.
This will make array-search possible.
Closes #280.
Unit Tests
test_construct_url_with_query_params_containing_array
-- checks ifConnector
's_construct_url
method encodes array as it was described earlier.Reviewers
@anagha-infoblox, @somashekhar