strelka-0.4: Extremely flexible and composable router

Safe HaskellNone
LanguageHaskell2010

Strelka.RequestBodyConsumer

Synopsis

Documentation

foldBytesTerminating :: (a -> ByteString -> Either a a) -> a -> RequestBodyConsumer a Source

Fold with support for early termination, which is interpreted from Left.

foldTextTerminating :: (a -> Text -> Either a a) -> a -> RequestBodyConsumer a Source

Fold with support for early termination, which is interpreted from Left.

foldText :: (a -> Text -> a) -> a -> RequestBodyConsumer a Source

A UTF8 text chunks decoding consumer.

bytesParser :: Parser a -> RequestBodyConsumer (Either Text a) Source

Turn a bytes parser into an input stream consumer.

parserResult :: Monoid i => (forall a. (a -> i -> Either a a) -> a -> RequestBodyConsumer a) -> IResult i a -> RequestBodyConsumer (Either Text a) Source