From c709626fed65fb89953cac94014e7826458657c6 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Tue, 6 Sep 2016 13:44:56 +0200 Subject: [PATCH] HasHttpManager used to be in http-conduit before http-client 0.4.19 --- servant-client/servant-client.cabal | 1 + servant-client/src/Servant/Common/Req.hs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index c49cfe0e..3b8e521e 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -53,6 +53,7 @@ library , text >= 1.2 && < 1.3 , transformers >= 0.3 && < 0.6 , transformers-compat >= 0.4 && < 0.6 + , http-conduit , mtl hs-source-dirs: src default-language: Haskell2010 diff --git a/servant-client/src/Servant/Common/Req.hs b/servant-client/src/Servant/Common/Req.hs index aa6226cf..a6ec7b0d 100644 --- a/servant-client/src/Servant/Common/Req.hs +++ b/servant-client/src/Servant/Common/Req.hs @@ -21,6 +21,13 @@ import Control.Monad.Error.Class (MonadError(..)) #endif import Control.Monad.Trans.Except +#if MIN_VERSION_http_client(0,4,19) +import Network.HTTP.Client ( HasHttpManager ) +#else +import Network.HTTP.Client.Conduit ( HasHttpManager(getHttpManager) ) +#endif + + import GHC.Generics import Control.Monad.IO.Class () import Control.Monad.Reader