This module defines query string processing functions.
See the dojo/io-query reference documentation for more information.
takes a name/value mapping object and returns a string representing a URL-encoded version of that object.
| Parameter | Type | Description |
|---|---|---|
| map | Object |
this object:
{
blah: "blah",
multi: [
"thud",
"thonk"
]
};
yields the following query string:
"blah=blah&multi=thud&multi=thonk"
Create an object representing a de-serialized query section of a URL. Query keys with multiple values are returned in an array.
| Parameter | Type | Description |
|---|---|---|
| str | String |
This string:
"foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&"
results in this object structure:
{
foo: [ "bar", "baz" ],
thinger: " spaces =blah",
zonk: "blarg"
}
Note that spaces and other urlencoded entities are correctly handled.