[whatwg] URL: URLQuery

Anne van Kesteren annevk at annevk.nl
Sat Oct 13 14:11:38 PDT 2012


On Sat, Oct 13, 2012 at 10:39 PM, Mike Dierken <mike at dierken.com> wrote:
> Since a URL query string is not a strict map with only one value for a
> key, would the get/set operations allow for an array as well as an
> atomic value?

Yes, see http://url.spec.whatwg.org/#urlquery

get(): gets the first value.
getAll(): gets all values.
set(name, value): sets name to a single value.
set(name, [value, value]): sets name to multiple values. (We might
want to make this variadic instead I think?)
delete(name): removes name and all its values.


-- 
http://annevankesteren.nl/



More information about the whatwg mailing list