url
url copied to clipboard
URLSearchParams with repeated parameters
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?