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

Generated vanilla code does not properly handle arrays (QueryParams) #17

Open
ghost opened this issue Mar 8, 2017 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Mar 8, 2017

It seems like the generated code builds arrays like so ?myParam=var1,var2,var3 which is not properly parsed by most servers, and in fact as far as I can tell this format is not even handled by Servant's own QueryParams.

The correctly generated javascript should look like: ?myParam=var1&myParam=var2&myParam=var3 and this list should itself be generated in javascript, at runtime, because it depends on the array parameter passed into the function.

Some servers also accept ?myParam[]=var1&myParam[]=var2&myParam[]=var3, but not all.

It doesn't seem like anybody has really tried using this generated JS code...

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

0 participants