This class represents a query parameter value that contains multiple sub-values which are delimited by a given
character.
According to RFC 3986 this subset of sub-delims is allowed: ["!", "$", "(", ")", "*", "+", ",", ";"].
The specified delimiter character will be not URI-encoded when used as query parameter for an Url instance.
| Name | Type | Description |
|---|---|---|
values |
Array.<(string|number)> |
The list of values to be associated to a key in a query string. The order of the values in the list will be preserved to build the query string. |
delimiter |
string |
The character to use as delimiter |
Throws:
-
in case the
valuesargument isnt an array or its elements have types different fromstringandnumber`.
Example
const myValues = new H.service.Url.DelimitedQuerySubValues(["val1", "val2"], ";");
const url = new H.service.Url("https", "host.com", "", {"myKey": myValues});
url.toString(); // "https://host.com?myKey=val1;val2"