simple-0.11.0: A minimalist web framework for the WAI server interface

Safe HaskellTrustworthy
LanguageHaskell2010

Web.REST

Description

REST is a DSL for creating routes using RESTful HTTP verbs. See http://en.wikipedia.org/wiki/Representational_state_transfer

Synopsis

Documentation

data REST m s Source

Type used to encode a REST controller.

Constructors

REST 

Fields

restIndex :: ControllerT s m ()
 
restShow :: ControllerT s m ()
 
restCreate :: ControllerT s m ()
 
restUpdate :: ControllerT s m ()
 
restDelete :: ControllerT s m ()
 
restEdit :: ControllerT s m ()
 
restNew :: ControllerT s m ()
 

type RESTController m r = RESTControllerM m r () Source

rest :: Monad m => RESTControllerM m r a -> REST m r Source

routeREST :: Monad m => REST m s -> ControllerT s m () Source

index :: ControllerT s m () -> RESTController m s Source

GET /

show :: ControllerT s m () -> RESTController m s Source

GET /:id

create :: ControllerT s m () -> RESTController m s Source

POST /

update :: ControllerT s m () -> RESTController m s Source

PUT /:id

delete :: ControllerT s m () -> RESTController m s Source

DELETE /:id

edit :: ControllerT s m () -> RESTController m s Source

GET /:id/edit

new :: ControllerT s m () -> RESTController m s Source

GET /new