From a61c439efbd7ea3966e2bfbc7d6fc16876fb59d2 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Fri, 29 Jul 2022 23:15:25 +0000 Subject: [PATCH] fix: Use Hyper 4 to send duplicate query params with the same name --- box.json | 2 +- models/TwilioClient.cfc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/box.json b/box.json index 64f259c..eb3ad5c 100644 --- a/box.json +++ b/box.json @@ -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", diff --git a/models/TwilioClient.cfc b/models/TwilioClient.cfc index 2092559..d3f7d45 100644 --- a/models/TwilioClient.cfc +++ b/models/TwilioClient.cfc @@ -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;