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

Safe HaskellTrustworthy

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 rSource

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

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

GET /

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

GET /:id

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

POST /

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

PUT /:id

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

DELETE /:id

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

GET /:id/edit

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

GET /new