servant-client 0.20.1 → 0.20.2
raw patch · 3 files changed
+22/−14 lines, 3 filesdep ~QuickCheckdep ~basedep ~containersnew-uploader
Dependency ranges changed: QuickCheck, base, containers, servant, servant-client-core, servant-server, time
Files
CHANGELOG.md view
@@ -3,6 +3,15 @@ Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions. +0.20.2+------++- Client Middleware [#1720](https://github.com/haskell-servant/servant/pull/1720)++ Clients now support real middleware of type `(Request -> ClientM Response) -> Request -> ClientM Response` which can be configured in `ClientEnv`.+ This allows access to raw request and response data. It can also be used to control how/when/if actual requests are performed.+ Middleware can be chained with function composition `mid1 . mid2 . mid3`.+ 0.20 ----
servant-client.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: servant-client-version: 0.20.1+version: 0.20.2 synopsis: Automatic derivation of querying functions for servant category: Servant, Web description:@@ -22,7 +22,7 @@ build-type: Simple tested-with:- GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2+ GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1 extra-source-files: CHANGELOG.md@@ -94,9 +94,9 @@ -- Bundled with GHC: Lower bound to not force re-installs -- text and mtl are bundled starting with GHC-8.4 build-depends:- , base >=4.9 && <4.20+ , base >=4.14 && <4.21 , bytestring >=0.10.8.1 && <0.13- , containers >=0.5.7.1 && <0.7+ , containers >=0.5.7.1 && <0.8 , deepseq >=1.4.2.0 && <1.6 , mtl ^>=2.2.2 || ^>=2.3.1 , stm >=2.4.5.1 && <2.6@@ -106,8 +106,8 @@ -- Servant dependencies. -- Strict dependency on `servant-client-core` as we re-export things. build-depends:- , servant >=0.20 && <0.21- , servant-client-core >=0.20.1 && <0.21+ , servant >=0.20.2 && <0.21+ , servant-client-core >=0.20.2 && <0.21 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions.@@ -174,9 +174,9 @@ , hspec >=2.6.0 && <2.12 , HUnit >=1.6.0.0 && <1.7 , network >=2.8.0.0 && <3.3- , QuickCheck >=2.12.6.1 && <2.15- , servant >=0.20 && <0.21- , servant-server >=0.20 && <0.21+ , QuickCheck >=2.12.6.1 && <2.16+ , servant >=0.20.2 && <0.21+ , servant-server >=0.20.2 && <0.21 build-tool-depends: hspec-discover:hspec-discover >=2.6.0 && <2.12
src/Servant/Client/Internal/HttpClient.hs view
@@ -33,10 +33,9 @@ import Data.ByteString.Builder (toLazyByteString) import qualified Data.ByteString.Lazy as BSL-#if !MIN_VERSION_base_compat(0,14,0)-import Data.Foldable (foldl')-#endif-import Data.Foldable (toList)+import qualified Data.List as List+import Data.Foldable+ (toList) import Data.Functor.Alt (Alt (..)) import Data.Maybe@@ -294,7 +293,7 @@ -- Query string builder which does not do any encoding buildQueryString [] = mempty- buildQueryString qps = "?" <> foldl' addQueryParam mempty qps+ buildQueryString qps = "?" <> List.foldl' addQueryParam mempty qps addQueryParam qs (k, v) = qs <> (if BS.null qs then mempty else "&") <> urlEncode True k <> foldMap ("=" <>) v