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