route-parser
route-parser copied to clipboard
Support Array Parameters
I'm having trouble with url's that have arrays as parameters.
/users?userIds=1&userIds=2
Is this form supported / is there any intention of adding it in the future?
It's currently a weird artifact that query parameters are supported here at all.
I'd love to give them some first class support. I haven't started doing the research yet, are there existing APIs you think win in query-param-parsing arena?
@rcs -
Perhaps using qs
library?
https://www.npmjs.com/package/qs
There is also another approach to arrays in address:
/users?userIds[]=1&userIds[]=2
Both should be supported, as both are widely used.