respond-1.1.0: process and route HTTP requests and generate responses on top of WAI

Safe HaskellNone



utilities and defaults for sending responses.



defaultHandlers :: FailureHandlers Source

default failure handlers. uses the defaultXHandler for each field

defaultUnsupportedMethodHandler :: MonadRespond m => [StdMethod] -> Method -> m ResponseReceived Source

default unsupported method handler sends back an EmptyBody with status 405 and an Allowed header listing the allowed methods in the first path

defaultUnmatchedPathHandler :: MonadRespond m => m ResponseReceived Source

respond with status404 and nothing else

defaultBodyParseFailureHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived Source

respond with status 400 and a message about the body parse failure