diff --git a/servant-client.cabal b/servant-client.cabal index db546f28..2b17dc21 100644 --- a/servant-client.cabal +++ b/servant-client.cabal @@ -44,6 +44,7 @@ library , either , exceptions , http-client + , http-client-tls , http-types , network-uri >= 2.6 , safe diff --git a/src/Servant/Common/Req.hs b/src/Servant/Common/Req.hs index d48e3905..71e2447a 100644 --- a/src/Servant/Common/Req.hs +++ b/src/Servant/Common/Req.hs @@ -19,6 +19,7 @@ import Data.String.Conversions import Data.Text import Data.Text.Encoding import Network.HTTP.Client +import Network.HTTP.Client.TLS import Network.HTTP.Types import Network.URI import Servant.Common.BaseUrl @@ -91,7 +92,7 @@ reqToRequest req (BaseUrl reqScheme reqHost reqPort) = {-# NOINLINE __manager #-} __manager :: MVar Manager -__manager = unsafePerformIO (newManager defaultManagerSettings >>= newMVar) +__manager = unsafePerformIO (newManager tlsManagerSettings >>= newMVar) __withGlobalManager :: (Manager -> IO a) -> IO a __withGlobalManager action = modifyMVar __manager $ \ manager -> do