packages feed

http-conduit 2.1.1 → 2.1.2

raw patch · 3 files changed

+20/−4 lines, 3 filesdep ~http-client

Dependency ranges changed: http-client

Files

Network/HTTP/Client/Conduit.hs view
@@ -18,6 +18,7 @@       -- * General HTTP client interface     , module Network.HTTP.Client     , httpLbs+    , httpNoBody       -- * Lower-level conduit functions     , requestBodySource     , requestBodySourceChunked@@ -40,7 +41,7 @@                                                defaultManagerSettings, httpLbs,                                                newManager, responseClose,                                                responseOpen, withManager,-                                               withResponse, BodyReader, brRead, brConsume)+                                               withResponse, BodyReader, brRead, brConsume, httpNoBody) import qualified Network.HTTP.Client          as H import           Network.HTTP.Client.TLS      (tlsManagerSettings) @@ -171,3 +172,17 @@     env <- ask     let man = getHttpManager env     liftIO $ H.httpLbs req man++-- | Same as 'H.httpNoBody', except it uses the @Manager@ in the reader environment.+--+-- This can be more convenient that using 'withManager' as it avoids the need+-- to specify the base monad for the response body.+--+-- Since 2.1.2+httpNoBody :: (MonadIO m, HasHttpManager env, MonadReader env m)+           => Request+           -> m (Response ())+httpNoBody req = do+    env <- ask+    let man = getHttpManager env+    liftIO $ H.httpNoBody req man
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         2.1.1+version:         2.1.2 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -29,7 +29,7 @@                  , conduit               >= 0.5.5   && < 1.2                  , http-types            >= 0.7                  , lifted-base           >= 0.1-                 , http-client           >= 0.3     && < 0.4+                 , http-client           >= 0.3.2   && < 0.4                  , http-client-tls                  , monad-control                  , mtl
test/main.hs view
@@ -100,10 +100,11 @@  nextPort :: I.IORef Int nextPort = unsafePerformIO $ I.newIORef 15452+{-# NOINLINE nextPort #-}  getPort :: IO Int getPort = do-    port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p)+    port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p + 1)     esocket <- try $ bindPort port "*4"     case esocket of         Left (_ :: IOException) -> getPort