How to properly use UrlSearchParams to create url a structure like the following:
example.org?tag[]=one&tag[]=two&tag[]=other
When I use Url Params as presented below:
let params = new URLSearchParams();
params.append('tag', 'one');
params.append('tag', 'two');
params.append('tag', 'other');
The Url looks like this:
example.org?tag=one&tag=two&tag=other
This approach causes some problems on web servers because they treat that query string the same way as ?tag=one. The server gets only the first value if there are no brackets present.