We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ef5021 commit 1fba9dcCopy full SHA for 1fba9dc
changelog.d/1589
@@ -0,0 +1,2 @@
1
+synopsis: Only include question mark for nonempty query strings
2
+prs: 1589
servant-client/src/Servant/Client/Internal/HttpClient.hs
@@ -289,7 +289,8 @@ defaultMakeClientRequest burl r = Client.defaultRequest
289
Https -> True
290
291
-- Query string builder which does not do any encoding
292
- buildQueryString = ("?" <>) . foldl' addQueryParam mempty
+ buildQueryString [] = mempty
293
+ buildQueryString qps = "?" <> foldl' addQueryParam mempty qps
294
295
addQueryParam qs (k, v) =
296
qs <> (if BS.null qs then mempty else "&") <> urlEncode True k <> foldMap ("=" <>) v
0 commit comments