packages feed

io-streams-http 0.2.0.0 → 0.2.0.1

raw patch · 2 files changed

+13/−10 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

io-streams-http.cabal view
@@ -1,5 +1,5 @@ name:                io-streams-http-version:             0.2.0.0+version:             0.2.0.1 synopsis:            http-client for io-streams description:         Thin io-streams wrapper for http-client license:             BSD3
src/System/IO/Streams/HTTP.hs view
@@ -23,18 +23,21 @@ -- > module Main where -- > import           System.IO.Streams       ( InputStream, OutputStream ) -- > import qualified System.IO.Streams as    Streams--- > import           System.IO.Streams.HTTP  ( withHTTP, parseUrl, withManager )+-- > import           System.IO.Streams.HTTP  ( withHTTP, parseUrl, withManager, stream ) -- > import           Network.HTTP.Client.TLS ( tlsManagerSettings ) -- > import           Network.HTTP.Client     ( responseBody )--- > --- > main :: IO ()--- > main = do--- >  req <- parseUrl "http://www.worldslongestwebsite.com"--- >  withManager tlsManagerSettings $ \m ->--- >    withHTTP req m $ \resp -> do--- >      Streams.supplyTo Streams.stdout (responseBody resp) -- >---+-- > bodyTest :: IO ()+-- > bodyTest = do+-- >   req <- parseUrl "https://google.com"+-- >   let request = req { method = "POST"+-- >                     , requestBody = stream $ Streams.fromLazyByteString "body"+-- >                     }+-- >   withManager tlsManagerSettings $ \m ->+-- >     withHTTP req m $ \resp -> do+-- >         Streams.supplyTo Streams.stdout (responseBody resp)   +-- >+-- > -- For non-streaming request bodies, study the 'RequestBody' type, -- which also -- accepts strict \/ lazy bytestrings