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

patch for #1151 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

patch for #1151 #6

wants to merge 1 commit into from

Conversation

dburles
Copy link
Contributor

@dburles dburles commented Jan 1, 2015

This will overwrite the string value with the array that follows it. e.g:

http://example.com/?foo=bar&foo[]=baz becomes { foo: ["baz"] }

Though maybe it might be better to instead keep the first value...

@dburles
Copy link
Contributor Author

dburles commented Jan 1, 2015

Handling params in this way will solve the above weirdness and perhaps it'd be better to use Qs as @bradvogel suggested.

#8

See: ljharb/qs#63
and here for example: https://github.com/hapijs/qs/blob/master/test/parse.js#L87-L88

@mitar
Copy link

mitar commented Jan 30, 2015

I also think that all values should be simply combined into one array. So if multiple keys are repeated, an array should be made. And same if some are with []. All this should be simply combined into an array.

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

Successfully merging this pull request may close these issues.

2 participants