- parseRequest :: String -> Either String (Http Request)
- parseResponse :: String -> Either String (Http Response)
- parseHeaders :: String -> Either String Headers
- pRequest :: GenParser Char st (Http Request)
- pResponse :: GenParser Char st (Http Response)
- pHeaders :: GenParser Char st Headers
- pVersion :: GenParser Char st Version
- pMethod :: GenParser Char st Method
- versionFromString :: String -> Version
- methodFromString :: String -> Method
Top level message parsers.
parseRequest :: String -> Either String (Http Request)Source
Parse a string as an HTTP request message. This parser is very forgiving.
parseResponse :: String -> Either String (Http Response)Source
Parse a string as an HTTP request message. This parser is very forgiving.
Exposure of internal parsec parsers.
pRequest :: GenParser Char st (Http Request)Source
Parsec parser to parse the header part of an HTTP request.
pResponse :: GenParser Char st (Http Response)Source
Parsec parser to parse the header part of an HTTP response.
pHeaders :: GenParser Char st HeadersSource
Parsec parser to parse one or more, possibly multiline, HTTP header lines.
pVersion :: GenParser Char st VersionSource
Parsec parser to parse HTTP versions. Recognizes X.X versions only.
pMethod :: GenParser Char st MethodSource
Parsec parser to parse an HTTP method. Parses arbitrary method but
actually recognizes the ones listed as a constructor for Method
.
Helper methods.
versionFromString :: String -> VersionSource
Recognizes HTTP protocol version 1.0 and 1.1, all other string will produce version 1.1.
methodFromString :: String -> MethodSource
Helper to turn fully capitalized string into request method.