Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrays in query objects are not formatted #25

Open
shishircc opened this issue Sep 15, 2016 · 1 comment
Open

arrays in query objects are not formatted #25

shishircc opened this issue Sep 15, 2016 · 1 comment

Comments

@shishircc
Copy link

If query object has array, it will not be formatted
query = { a:{b:[1,2]},c:1}
will result in a=&c=1

@mauvm
Copy link

mauvm commented Apr 21, 2017

I have the same problem.

querystring@0.2.0 is used under the hood for formatting the query. See

node-url/url.js

Line 410 in 13a35bd

query = querystring.stringify(this.query);
.

Unfortunately the querystring package does not stringify objects:
https://github.com/Gozala/querystring/blob/master/encode.js#L24

I was only using pathname and query, so qs (which supporst stringifying nested objects) will do for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants