Safe Haskell | None |
---|---|
Language | Haskell2010 |
utilities and defaults for sending responses.
- defaultHandlers :: FailureHandlers
- defaultUnsupportedMethodHandler :: MonadRespond m => [StdMethod] -> Method -> m ResponseReceived
- defaultUnmatchedPathHandler :: MonadRespond m => m ResponseReceived
- defaultBodyParseFailureHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived
- defaultAuthFailedHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived
- defaultAccessDeniedHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived
- defaultCaughtExceptionHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived
- defaultUnacceptableResponseHandler :: MonadRespond m => m ResponseReceived
Documentation
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
defaultAuthFailedHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived Source
respond with 401
defaultAccessDeniedHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived Source
respond with 403
defaultCaughtExceptionHandler :: (MonadRespond m, ReportableError e) => e -> m ResponseReceived Source
respond with 500
defaultUnacceptableResponseHandler :: MonadRespond m => m ResponseReceived Source
respond with 406