okResponse :: String -> HttpResponse notFoundResponse :: [Char] -> HttpResponse badQueryResponse :: String -> HttpResponse notImplementedResponse :: String -> HttpResponse
These functions provide convenient ways to construct common HTTP responses containing HTML documents.
okResponsecreates a normal response.
notFoundResponsegenerates an error response, indicated that the server does not have the document indicated by the URL.
badQueryResponsegenerates an error response, to indicate that something is wrong with the request (e.g., a bad URL).
notImplementedResponsegenerates an error response, to indicate that something is wrong in the server.
In all cases, the content is marked as
having Mime type
text/html, so the
String argument should be
some HTML text.
okResponse = okResponse' htmlType notFoundResponse = notImplementedResponse' htmlType badQueryResponse = badQueryResponse' htmlType notImplementedResponse = notImplementedResponse' htmlType