hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Issue when specifying multiple query parameters with the same name

Open jeff-chastain opened this issue 2 years ago • 1 comments

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.

jeff-chastain avatar Jul 27 '22 21:07 jeff-chastain