ihttp-0.2.1: Incremental HTTP iteratee

Stabilitybeta
MaintainerErtugrul Soeylemez <es@ertes.de>

Network.IHttp.Request

Contents

Description

Iteratees for requests.

Synopsis

Iteratees

request :: Monad m => Int -> Int -> Iteratee ByteString m RequestSource

Get the next full request from a netLinesEmpty-splitted byte stream. If the request 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.

requestLine :: Monad m => Iteratee ByteString m RequestSource

Get the next request line from a netLinesEmpty-splitted byte stream. If the request is invalid or the stream ends prematurely an iteratee error is thrown.

Enumerators

enumRequest :: forall b m. Monad m => Request -> Enumerator ByteString m bSource

Enumerate a complete request as a protocol string stream. You can use Data.Enumerator.Binary.iterHandle to send it.

enumRequestLine :: forall b m. Monad m => HttpMethod -> ByteString -> HttpVersion -> Enumerator ByteString m bSource

Enumerate a request line with the given method, URI and HTTP version as a protocol string stream. You can use Data.Enumerator.Binary.iterHandle to send it.