From 860e430a83699ce540a9a1047153360999872bf5 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Thu, 4 Apr 2024 23:02:50 -0700 Subject: [PATCH] fixup! refactor: use `NameValueCollection` instead of `FormUrlEncodedContent` in codegen, fix #109 (#113) --- src/Camille.RiotGames/src/IRiotGamesApi.cs | 1 - srcgen/endpointMethods.dt | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Camille.RiotGames/src/IRiotGamesApi.cs b/src/Camille.RiotGames/src/IRiotGamesApi.cs index bff5124e..182a377a 100644 --- a/src/Camille.RiotGames/src/IRiotGamesApi.cs +++ b/src/Camille.RiotGames/src/IRiotGamesApi.cs @@ -1,7 +1,6 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Camille.Enums; namespace Camille.RiotGames { diff --git a/srcgen/endpointMethods.dt b/srcgen/endpointMethods.dt index 3bfe5e32..c4013d3a 100644 --- a/srcgen/endpointMethods.dt +++ b/srcgen/endpointMethods.dt @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Net.Http; using System.Runtime.CompilerServices; using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Web; using Camille.Core; using Camille.Enums; @@ -178,7 +178,8 @@ namespace Camille.{{= it.namespace }} { {{? isAsync }} {{? queryParams.length }} - var queryParams = new NameValueCollection(); + // Private `HttpQSCollection` override of `NameValueCollection`. + var queryParams = HttpUtility.ParseQueryString(""); {{ for (const queryParam of queryParams) {