Add TLS support
This commit is contained in:
parent
83e46f41ef
commit
4228447e91
2 changed files with 3 additions and 1 deletions
|
@ -44,6 +44,7 @@ library
|
|||
, either
|
||||
, exceptions
|
||||
, http-client
|
||||
, http-client-tls
|
||||
, http-types
|
||||
, network-uri >= 2.6
|
||||
, safe
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue