Skip to content

Commit

Permalink
fix: Use Hyper 4 to send duplicate query params with the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Jul 29, 2022
1 parent d7c9127 commit a61c439
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"format:check": "cfformat check models/**/*.cfc,tests/Application.cfc,tests/resources/**/*.cfc,tests/specs/**/*.cfc,ModuleConfig.cfc"
},
"dependencies":{
"hyper":"^3.4.0"
"hyper":"^4.0.0"
},
"devDependencies":{
"testbox":"^4.5.0+5",
Expand Down
6 changes: 3 additions & 3 deletions models/TwilioClient.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ component singleton accessors="true" {
.setUrl( "/v1/PhoneNumbers/#trim( arguments.phoneNumber )#" );

if ( arguments.withCallerName ) {
req.withQueryParams( { "Type": "caller-name" } );
req.appendQueryParam( "Type", "caller-name" );
}

for ( var type in arguments.types ) {
req.withQueryParams( { "Type": type } );
req.appendQueryParam( "Type", type );
}

for ( var addon in arguments.addons ) {
req.withQueryParams( { "AddOns": addon } );
req.appendQueryParam( "AddOns", addon );
}

return req;
Expand Down

0 comments on commit a61c439

Please sign in to comment.