http-kit-0.5.1: A low-level HTTP library

Safe HaskellSafe-Inferred

Network.HTTP.Toolkit.InputStream

Synopsis

Documentation

data InputStream Source

An abstraction for input streams that allows to read and unread input.

Constructors

InputStream 

Fields

_read :: IO ByteString
 
_unread :: ByteString -> IO ()
 

makeInputStream :: IO ByteString -> IO InputStreamSource

Create an InputStream from provided IO action.

readInput :: InputStream -> IO ByteStringSource

Read some input.

unreadInput :: InputStream -> ByteString -> IO ()Source

Push back some input. The pushed back input will be returned by a later call to readInput.

readAtLeast :: InputStream -> Int -> IO ByteStringSource

Read at least the specified number of bytes from the input stream.