Stability | beta |
---|---|
Maintainer | Ertugrul Soeylemez <es@ertes.de> |
Iteratees for response.
- response :: Monad m => Int -> Int -> Iteratee ByteString m Response
- responseLine :: Monad m => Iteratee ByteString m Response
- enumResponse :: forall b m. Monad m => Response -> Enumerator ByteString m b
- enumResponseLine :: forall b m. Monad m => HttpVersion -> Int -> ByteString -> Enumerator ByteString m b
Iteratees
response :: Monad m => Int -> Int -> Iteratee ByteString m ResponseSource
Get the next full response from a netLinesEmpty
-splitted byte
stream. If the response is invalid or the stream ends prematurely an
iteratee error is thrown. The first Int
specifies the maximum
header content length. The second Int
specifies the maximum number
of headers. Excess data is truncated safely in constant space.
responseLine :: Monad m => Iteratee ByteString m ResponseSource
Get the next response line form netLinesEmpty
-splitted stream.
If the response line is invalid or the stream ended prematurely, then
an iteratee error is thrown.
Enumerators
enumResponse :: forall b m. Monad m => Response -> Enumerator ByteString m bSource
Enumerate a complete response as a protocol string stream. You can
use Data.Enumerator.Binary.iterHandle
to send it.
enumResponseLine :: forall b m. Monad m => HttpVersion -> Int -> ByteString -> Enumerator ByteString m bSource
Enumerate a response line with the given HTTP version, response
code and message as a protocol string stream. You can use
Data.Enumerator.Binary.iterHandle
to send it.