- type ResponseCode = (Int, Int, Int)
- class Show a => Content a where
- toResponse :: ResponseCode -> [Header] -> a -> Response ByteString
- (//) :: String -> String -> String
- getRelativePath :: String -> String -> Maybe String
- getReason :: ResponseCode -> String
- getCodeString :: ResponseCode -> String
- getResponse200 :: Content a => a -> Response ByteString
- getResponse303 :: String -> Response ByteString
- getResponse400 :: Response ByteString
- getResponse401 :: String -> Response ByteString
- getResponse404 :: String -> Response ByteString
- getResponse405 :: RequestMethod -> Response ByteString
- getResponse500 :: String -> Response ByteString
- getResponse503 :: String -> Response ByteString
- getDirectoryIndex :: FilePath -> Bool -> IO [String]
- getFileOrDirectoryIndex :: FilePath -> Bool -> IO (Either (FilePath, ByteString) [String])
- getFileResponse :: String -> FilePath -> Maybe String -> IO (Response ByteString)
- getFileOrDirectoryIndexResponse :: String -> FilePath -> Maybe String -> Bool -> IO (Response ByteString)
- getErrorResponse :: ResponseCode -> [Header] -> Html -> Response ByteString
- guessContentType :: FilePath -> String
- data ServletRequest = ServletRequest {}
- data Input = Input {
- inputValue :: ByteString
- inputFilename :: Maybe String
- inputContentType :: ContentType
- module Hascat.App
Documentation
type ResponseCode = (Int, Int, Int)
For easy pattern matching, HTTP response codes xyz
are
represented as (x,y,z)
.
class Show a => Content a whereSource
toResponse :: ResponseCode -> [Header] -> a -> Response ByteStringSource
getResponse200 :: Content a => a -> Response ByteStringSource
getFileOrDirectoryIndex :: FilePath -> Bool -> IO (Either (FilePath, ByteString) [String])Source
getFileResponse :: String -> FilePath -> Maybe String -> IO (Response ByteString)Source
getFileOrDirectoryIndexResponse :: String -> FilePath -> Maybe String -> Bool -> IO (Response ByteString)Source
getErrorResponse :: ResponseCode -> [Header] -> Html -> Response ByteStringSource
The value of an input parameter, and some metadata.
Input | |
|
module Hascat.App