- data Input = Input {
- inputValue :: ByteString
- inputFilename :: Maybe String
- inputContentType :: ContentType
- data ServletRequest = ServletRequest {}
- decodeInput :: Request ByteString -> ServletRequest
- takeInput :: [Header] -> ByteString -> ByteString
- formDecode :: String -> [(String, String)]
- urlDecode :: String -> String
- maybeRead :: Read a => String -> Maybe a
- replace :: Eq a => a -> a -> [a] -> [a]
Documentation
The value of an input parameter, and some metadata.
Input | |
|
Inputs
decodeInput :: Request ByteString -> ServletRequestSource
Gets and decodes the input according to the request method and the content-type.
:: [Header] | |
-> ByteString | Request body. |
-> ByteString | CONTENT_LENGTH bytes from the request body, or the empty string if there is no CONTENT_LENGTH. |
Takes the right number of bytes from the input.
URL encoding
formDecode :: String -> [(String, String)]Source
Gets the name-value pairs from application/x-www-form-urlencoded data.
urlDecode :: String -> StringSource
Converts a single value from the application/x-www-form-urlencoded encoding.