Open danawoodman opened 1 year ago
fetcher().get('/foo', { bar: ['a', 'b'] })
Should result in /foo?bar=a&bar=b but instead results in /foo?bar=a,b because the array is just being stringified.
/foo?bar=a&bar=b
/foo?bar=a,b
I believe it is because of the line passing the payload as an object to URLSearchParams: https://github.com/kwhitley/itty-fetcher/blob/v0.x/src/itty-fetcher.ts#L75
URLSearchParams
Should result in
/foo?bar=a&bar=b
but instead results in/foo?bar=a,b
because the array is just being stringified.I believe it is because of the line passing the payload as an object to
URLSearchParams
: https://github.com/kwhitley/itty-fetcher/blob/v0.x/src/itty-fetcher.ts#L75