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

Issue when specifying multiple query parameters with the same name #33

Open
jeff-chastain opened this issue Jul 27, 2022 · 1 comment
Open

Comments

@jeff-chastain
Copy link

HTTP GET requests allow for multiple parameters to be passed that share the same name. For example, the following GET call to the Twilio lookups API allows for the 'Type' parameter to be specified multiple times.

https://lookups.twilio.com/v1/PhoneNumbers/13056772308?Type=carrier&Type=caller-name

Currently, when calling the setQueryParam or withQueryParams methods on a HyperRequest, the query parameters are stored in a structure, which means multiple parameters with the same name will simply overwrite the previous value.

Instead, parameters should be stored to allow multiple parameters with the same name, similar to how stacking multiple cfhttpparam tags would allow the same parameter name to be used (and passed) multiple times.

@elpete
Copy link
Collaborator

elpete commented Jul 29, 2022

I think that passing the values as an array will do what you are specifying. I'm not positive if that was only done for the form fields or if it also encompassed query params.

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

2 participants