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

Array as query params sent as string when only one item #55

Open
lionep opened this issue Apr 8, 2021 · 0 comments
Open

Array as query params sent as string when only one item #55

lionep opened this issue Apr 8, 2021 · 0 comments

Comments

@lionep
Copy link
Contributor

lionep commented Apr 8, 2021

When using queries like /myroute?values[]=1 through the middleware, the backend server receive as query values=1 instead of values[]=1

Example with backend :

app.get('/*', (req, res) => {
  res.json({
    url: req.url
  });
});

Request in direct :

curl -g "localhost:8080/sample?values[]=1"
# {"url": "/az?toto[]=1"}

Request through middleware

curl -g "localhost:8081/sample?values[]=1"
# {"url": "/az?toto=1"}
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

1 participant