module Web.Skell.Responsible where
import qualified Data.Map.Lazy as M
import qualified Data.ByteString as Bs
import qualified Data.ByteString.Lazy as Bl
import Network.HTTP.Types
import Network.Wai
class Responsible a where
respond :: a -> Request -> Response
class Irresponsible a where
respondIO :: a -> Request -> IO Response
respond200 :: Bs.ByteString -> Bl.ByteString -> Response
respond200 contentType = responseLBS status200 [(hContentType, contentType)]
respond403 :: Bs.ByteString -> Bl.ByteString -> Response
respond403 contentType = responseLBS status403 [(hContentType, contentType)]
respond404 :: Bs.ByteString -> Bl.ByteString -> Response
respond404 contentType = responseLBS status404 [(hContentType, contentType)]
respond405 :: Bs.ByteString -> Bl.ByteString -> Response
respond405 contentType = responseLBS status405 [(hContentType, contentType)]