parseQueryString

fun parseQueryString(query: String): QueryParameters

Parse query string such as paramA=valueA&paramB=valueB into a map of several key-value pairs separated by '&' where key is the param name before '=' as String and value is the string after '=' as a list of String (as a query parameter may have many values).

Note: Missing the '=' sign, or missing value after '=' (e.g. foo= or foo) will result into an empty string value.

Return

Map with query parameter keys bound to a list with their values.

Parameters

query

URL query string. E.g.: param=value&foo=bar.