Snap.Internal.Parsing

snap-core-0.7.0.1: Snap: A Haskell Web Framework (Core)

Snap.Internal.Parsing

Synopsis

- fullyParse :: ByteString -> Parser a -> Either String a
- parseNum :: Parser Int64
- digit :: Parser Char
- letter :: Parser Char
- sp :: Parser Char
- untilEOL :: Parser ByteString
- crlf :: Parser ByteString
- generateFS :: (Word8 -> Bool) -> FastSet
- spaces :: Parser [Char]
- pSpaces :: Parser ByteString
- fieldChars :: Parser ByteString
- fieldCharSet :: FastSet
- pHeaders :: Parser [(ByteString, ByteString)]
- pWord :: Parser ByteString
- pQuotedString :: Parser ByteString
- isRFCText :: Char -> Bool
- matchAll :: [Char -> Bool] -> Char -> Bool
- pAvPairs :: Parser [(ByteString, ByteString)]
- pAvPair :: Parser (ByteString, ByteString)
- pParameter :: Parser (ByteString, ByteString)
- trim :: ByteString -> ByteString
- pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
- pContentTypeWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
- pToken :: Parser ByteString
- isToken :: Char -> Bool
- tokenTable :: FastSet
- parseToCompletion :: Parser a -> ByteString -> Maybe a
- pUrlEscaped :: Parser ByteString
- urlDecode :: ByteString -> Maybe ByteString
- urlEncode :: ByteString -> ByteString
- urlEncodeBuilder :: ByteString -> Builder
- urlEncodeTable :: FastSet
- hexd :: Char -> Builder
- finish :: Result a -> Result a
- parseUrlEncoded :: ByteString -> Map ByteString [ByteString]
- buildUrlEncoded :: Map ByteString [ByteString] -> Builder
- printUrlEncoded :: Map ByteString [ByteString] -> ByteString
- pCookies :: Parser [Cookie]
- parseCookie :: ByteString -> Maybe [Cookie]
- strictize :: ByteString -> ByteString

# Documentation

fullyParse :: ByteString -> Parser a -> Either String a

parseNum :: Parser Int64

digit :: Parser Char

Parsers for different tokens in an HTTP request.

letter :: Parser Char

sp :: Parser Char

untilEOL :: Parser ByteString

crlf :: Parser ByteString

generateFS :: (Word8 -> Bool) -> FastSet

spaces :: Parser [Char]

Parser for zero or more spaces.

pSpaces :: Parser ByteString

fieldChars :: Parser ByteString

fieldCharSet :: FastSet

pHeaders :: Parser [(ByteString, ByteString)]

Parser for request headers.

pWord :: Parser ByteString

pQuotedString :: Parser ByteString

isRFCText :: Char -> Bool

matchAll :: [Char -> Bool] -> Char -> Bool

pAvPairs :: Parser [(ByteString, ByteString)]

pAvPair :: Parser (ByteString, ByteString)

pParameter :: Parser (ByteString, ByteString)

trim :: ByteString -> ByteString

pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])

pContentTypeWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])

pToken :: Parser ByteString

isToken :: Char -> Bool

tokenTable :: FastSet

parseToCompletion :: Parser a -> ByteString -> Maybe a

pUrlEscaped :: Parser ByteString

urlDecode :: ByteString -> Maybe ByteString

Decodes an URL-escaped string (see http://tools.ietf.org/html/rfc2396.html#section-2.4)

urlEncode :: ByteString -> ByteString

URL-escapes a string (see http://tools.ietf.org/html/rfc2396.html#section-2.4)

urlEncodeBuilder :: ByteString -> Builder

URL-escapes a string (see http://tools.ietf.org/html/rfc2396.html#section-2.4) into a `Builder`.

urlEncodeTable :: FastSet

hexd :: Char -> Builder

finish :: Result a -> Result a

parseUrlEncoded :: ByteString -> Map ByteString [ByteString]

Parses a string encoded in `application/x-www-form-urlencoded` format.

buildUrlEncoded :: Map ByteString [ByteString] -> Builder

printUrlEncoded :: Map ByteString [ByteString] -> ByteString

pCookies :: Parser [Cookie]

parseCookie :: ByteString -> Maybe [Cookie]

strictize :: ByteString -> ByteString