webcrank-0.2: Webmachine inspired toolkit for building http applications and services.

Safe HaskellNone
LanguageHaskell98

Webcrank.Internal.Halt

Synopsis

Documentation

runHaltT :: HaltT m a -> m (Either Halt a) Source

halt :: Monad m => Status -> HaltT m a Source

Immediately end processing of the request, returning the response Status. It is the responsibility of the resource to ensure that all necessary response header and body elements have been added in order to make that response code valid.

werror :: Monad m => ByteString -> HaltT m a Source

Immediately end processing of this request, returning a 500 Internal Server Error response. The response body will contain the reason.

werrorWith :: Monad m => Status -> ByteString -> HaltT m a Source

Immediately end processing of this request, returning a response with the given Status. The response body will contain the reason.