Skip to content

Commit 64fa3fd

Browse files
committed
Use HTTP.newManager instead of deprecated HTTP.withManager
1 parent 379b1d1 commit 64fa3fd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Aws/Aws.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ simpleAws :: (Transaction r a, AsMemoryResponse a, MonadIO io)
190190
-> ServiceConfiguration r NormalQuery
191191
-> r
192192
-> io (MemoryResponse a)
193-
simpleAws cfg scfg request
194-
= liftIO $ HTTP.withManager $ \manager ->
195-
loadToMemory =<< readResponseIO =<< aws cfg scfg manager request
193+
simpleAws cfg scfg request = liftIO $ runResourceT $ do
194+
manager <- liftIO $ HTTP.newManager HTTP.tlsManagerSettings
195+
loadToMemory =<< readResponseIO =<< aws cfg scfg manager request
196196

197197
-- | Run an AWS transaction, without enforcing that response and request type form a valid transaction pair.
198198
--

Aws/Core.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ loadCredentialsFromEnv = liftIO $ do
319319
Traversable.sequence $ makeCredentials' <$> keyID <*> secret
320320

321321
loadCredentialsFromInstanceMetadata :: MonadIO io => io (Maybe Credentials)
322-
loadCredentialsFromInstanceMetadata = liftIO $ HTTP.withManager $ \mgr ->
323-
do
322+
loadCredentialsFromInstanceMetadata = do
323+
mgr <- liftIO $ HTTP.newManager HTTP.tlsManagerSettings
324324
-- check if the path is routable
325325
avail <- liftIO $ hostAvailable "169.254.169.254"
326326
if not avail

0 commit comments

Comments
 (0)