Safe Haskell | None |
---|---|
Language | Haskell2010 |
Strelka.Core.RequestParser
Synopsis
- newtype RequestParser m a = RequestParser (ReaderT Request (StateT [PathSegment] (ExceptT Text m)) a)
- run :: RequestParser m a -> Request -> [PathSegment] -> m (Either Text (a, [PathSegment]))
Documentation
newtype RequestParser m a Source #
Parser of an HTTP request. Analyzes its meta information, consumes the path segments and the body.
Constructors
RequestParser (ReaderT Request (StateT [PathSegment] (ExceptT Text m)) a) |
Instances
run :: RequestParser m a -> Request -> [PathSegment] -> m (Either Text (a, [PathSegment])) Source #
Execute the parser providing a request and a list of segments.