url icon indicating copy to clipboard operation
url copied to clipboard

URLSearchParams with repeated parameters

Open tomasdev opened this issue 10 months ago • 6 comments

What is the issue with the URL Standard?

URLs such as foo.com/?q=1&q=2 are valid and distinct than foo.com/?q=1 and foo.com/?q=2.

Most server frameworks allow q to be a list containing all values ([1, 2] in the case above)

However, there's no way to construct such parameters using existing URLSearchParams API.

Is this intentionally not offered to dissuade use, or was there an RFC that said q=1&q=2 is a wrongly formatted URL?

tomasdev avatar Dec 19 '24 17:12 tomasdev