General.Web
Description
General web utility functions.
- responseOK :: ResponseHeaders -> ByteString -> Response
- responseNotFound :: [Char] -> Response
- responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString)
- responseEvaluate :: Response -> IO ()
- responseRewrite :: (LBString -> LBString) -> Response -> IO Response
- type URL = String
- filePathToURL :: FilePath -> URL
- combineURL :: String -> String -> String
- escapeURL :: String -> String
- (++%) :: String -> String -> String
- unescapeURL :: String -> String
- escapeHTML :: String -> String
- (++&) :: String -> String -> String
- htmlTag :: String -> String -> String
- type Args = [(String, String)]
- cgiArgs :: IO (Maybe Args)
- cgiResponse :: Response -> IO ()
- parseHttpQueryArgs :: String -> Args
Documentation
responseOK :: ResponseHeaders -> ByteString -> Response
responseNotFound :: [Char] -> Response
responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString)
responseEvaluate :: Response -> IO ()
A URL, or internet address. These addresses will usually start with either
http://
or file://
.
filePathToURL :: FilePath -> URL
combineURL :: String -> String -> String
(++%) :: String -> String -> String
Escape the second argument as a CGI query string before appending
unescapeURL :: String -> String
Take an escape encoded string, and return the original
escapeHTML :: String -> String
Take a piece of text and escape all the HTML special bits
cgiResponse :: Response -> IO ()
parseHttpQueryArgs :: String -> Args