packages feed

io-streams-http 0.1.0.2 → 0.2.0.0

raw patch · 2 files changed

+7/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- System.IO.Streams.HTTP: stream :: InputStream ByteString -> RequestBody
+ System.IO.Streams.HTTP: stream :: IO (InputStream ByteString) -> RequestBody
- System.IO.Streams.HTTP: streamN :: Int64 -> InputStream ByteString -> RequestBody
+ System.IO.Streams.HTTP: streamN :: Int64 -> IO (InputStream ByteString) -> RequestBody

Files

io-streams-http.cabal view
@@ -1,5 +1,5 @@ name:                io-streams-http-version:             0.1.0.2+version:             0.2.0.0 synopsis:            http-client for io-streams description:         Thin io-streams wrapper for http-client license:             BSD3
src/System/IO/Streams/HTTP.hs view
@@ -111,18 +111,20 @@  ------------------------------------------------------------------------------ -- | Stream body of request-to :: InputStream ByteString -> (IO ByteString -> IO ()) -> IO ()-to is f = f $ maybe B.empty id <$> Streams.read is+to :: IO (InputStream ByteString) -> (IO ByteString -> IO ()) -> IO ()+to m f = do+  is <- m+  f $ maybe B.empty id <$> Streams.read is  ------------------------------------------------------------------------------ -- | Stream body of request-stream :: InputStream ByteString -> RequestBody+stream :: IO (InputStream ByteString) -> RequestBody stream p = RequestBodyStreamChunked (to p) {-# INLINABLE stream #-}  ------------------------------------------------------------------------------ -- | Stream with N bytes exactly-streamN :: Int64 -> InputStream ByteString -> RequestBody+streamN :: Int64 -> IO (InputStream ByteString) -> RequestBody streamN n p = RequestBodyStream n (to p) {-# INLINABLE streamN #-}