@@ -33,9 +33,7 @@ import Control.Arrow
3333import Control.Monad
3434 (unless)
3535import qualified Data.ByteString as BS
36−import Data.ByteString.Builder
37− (toLazyByteString)
38−import qualified Data.ByteString.Lazy as BL
36+import qualified Data.ByteString.Lazy as BL
3937import Data.Either
4038 (partitionEithers)
4139import Data.Constraint (Dict(..))
@@ -571,7 +569,7 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient m api, SBoolI (FoldRequire
571569 (Proxy :: Proxy mods) add (maybe req add) mparam
572570 where
573571 add :: a -> Request
574− add param = appendToQueryString pname (Just $ encodeQueryParam param) req
572+ add param = appendToQueryString pname (Just $ encodeQueryParamValue param) req
575573
576574 pname :: Text
577575 pname = pack $ symbolVal (Proxy :: Proxy sym)
@@ -579,9 +577,6 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient m api, SBoolI (FoldRequire
579577 hoistClientMonad pm _ f cl = \arg ->
580578 hoistClientMonad pm (Proxy :: Proxy api) f (cl arg)
581579
582−encodeQueryParam :: ToHttpApiData a => a -> BS.ByteString
583−encodeQueryParam = BL.toStrict . toLazyByteString . toEncodedUrlPiece
584−
585580-- | If you use a 'QueryParams' in one of your endpoints in your API,
586581-- the corresponding querying function will automatically take
587582-- an additional argument, a list of values of the type specified
@@ -623,7 +618,7 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient m api)
623618 )
624619
625620 where pname = pack $ symbolVal (Proxy :: Proxy sym)
626− paramlist' = map (Just . encodeQueryParam) paramlist
621+ paramlist' = map (Just . encodeQueryParamValue) paramlist
627622
628623 hoistClientMonad pm _ f cl = \as ->
629624 hoistClientMonad pm (Proxy :: Proxy api) f (cl as)