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

Only sends the last element of POST array #1320

Closed
deimios opened this issue Jan 4, 2024 · 1 comment · Fixed by #2964
Closed

Only sends the last element of POST array #1320

deimios opened this issue Jan 4, 2024 · 1 comment · Fixed by #2964

Comments

@deimios
Copy link

deimios commented Jan 4, 2024

Passing arrays as POST body variables requires repeating the variable name and appending square brackets.
Example:

  • item[] = 1
  • item[] = 2
  • item[] = n

So the sent/urlencoded POST data should look like:
item%5B%5D=1&item%5B%5D=2&item%5B%5D=n

However Bruno only sends:
item%5B%5D=n
Effectively it is ignoring all the prior instances of the same variable name.

The request settings I used:
Bruno-Array-Screenshot

helloanoop pushed a commit that referenced this issue Sep 15, 2024
… multiple values with same name. (#2964)

* Now the form-url-encoded params in the body can contain multiple values with same name.

* Updated the tests and renamed the function name

* Added the inimported function

* Minor changes.
@helloanoop
Copy link
Contributor

This will be available in upcoming version v1.29.0

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