¤ okResponse', notFoundResponse', et al

HTTP related types

Types

okResponse' :: HttpHeaders -> String -> HttpResponse
notFoundResponse' :: HttpHeaders -> String -> HttpResponse
badQueryResponse' :: HttpHeaders -> String -> HttpResponse
notImplementedResponse' :: HttpHeaders -> String -> HttpResponse
contentType :: String -> HttpHeaders
htmlType :: HttpHeaders

Description

These functions work like the corresponsing ones without a ' in the name, with the addition that they allow you to specify the Mime type of the returned document.

Equalities

htmlType = contentType "text/html"

okResponse' = stdResponse 200 "Have a Fudget" notFoundResponse' = stdResponse 404 "Not found" badQueryResponse' = stdResponse 400 "Error in query or submission" notImplementedResponse' = stdResponse 501 "Not implemented"

See Also

Returning HTML documents in an easier way: okResponse et al.

Manually creating other kinds of responses: stdResponse.