mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4941] [bug]: query parameter array doesn't work #1869
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1869
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NicolasR on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4941
Originally assigned to: @anwarulislam on GitHub.
Is there an existing issue for this?
Current behavior
Hi,
When i try to use an array query parameter, only last value is taken in account.
Steps to reproduce
Only last value is taken in account.
Logs and Screenshots
Environment
Production
Hoppscotch Version
Cloud
Interceptor
Not Applicable - Issue not related to network requests
Browsers Affected
No response
Operating System
None
Additional Information
No response
@liyasthomas commented on GitHub (Mar 26, 2025):
When you have two parameters with the same key in a query string or request, only the last value for that key will be retained.
@NicolasR commented on GitHub (Mar 26, 2025):
If i put directly in the url field: http://myapi?pony=1&pony=2 it works. It doesn't if i use the parameters form.
Is it by design or is it a bug ?
@liyasthomas commented on GitHub (Mar 26, 2025):
@anwarulislam can you look into this. I think the behaviour should be consistent across both scenarios: passing arguments via URL and Parameters tab.
@anwarulislam commented on GitHub (Mar 26, 2025):
@liyasthomas I'm looking into this.
@NZetterval commented on GitHub (Apr 9, 2025):
I also have noticed this bug, it have worked before. A related thing is that the generate code adds a [n] after the query parameter that it not should do.
Example)
Generates:
curl --request GET
--url 'https://api.example.com/v1/iot-subscriptions/?include[0]=health&include[1]=variables&include[2]=enablementHardware
Should be:
curl --request GET
--url 'https://api.example.com/v1/iot-subscriptions/?include=health&include=variables&include=enablementHardware
@anwarulislam commented on GitHub (Apr 9, 2025):
Hi @NZetterval!
Thanks for informing us of the related issue.
@jamesgeorge007 commented on GitHub (Apr 11, 2025):
Could you open an issue so that we can track this separately?
@jamesgeorge007 commented on GitHub (Apr 11, 2025):
Closing this issue since it is addressed in the latest release. Please feel free to let us know if you have any feedback.