Skip to content

Commit 635dde3

Browse files
authoredJun 21, 2024
Fix QueryParam Bug (#26)
* Fix bug when building query params * Update version number
1 parent b4ed479 commit 635dde3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/FluentHttpClient/FluentHttpClient.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageTags>fluent httpclient rest http api web client</PackageTags>
1616
<AssemblyVersion>$(Version)</AssemblyVersion>
1717
<FileVersion>$(Version)</FileVersion>
18-
<Version>4.2.2</Version>
18+
<Version>4.2.3</Version>
1919
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2020
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2121
<PackageReadmeFile>README.md</PackageReadmeFile>

‎src/FluentHttpClient/IEnumerableExtensions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ internal static class ListExtensions
1515
/// <returns></returns>
1616
public static string ToQueryString(this List<string> collection)
1717
{
18-
return $"?{string.Join("&", collection)}";
18+
return (collection.Count == 0)
19+
? string.Empty
20+
: $"?{string.Join("&", collection)}";
1921
}
2022
}

0 commit comments

Comments
 (0)
Please sign in to comment.