simple-0.8.0.0: 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 r Source

Type used to encode a REST controller.

Constructors

REST 

Fields

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

type RESTController m r = RESTControllerM m r ()Source

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

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

index :: ControllerT m r () -> RESTController m rSource

GET /

show :: ControllerT m r () -> RESTController m rSource

GET /:id

create :: ControllerT m r () -> RESTController m rSource

POST /

update :: ControllerT m r () -> RESTController m rSource

PUT /:id

delete :: ControllerT m r () -> RESTController m rSource

DELETE /:id

edit :: ControllerT m r () -> RESTController m rSource

GET /:id/edit

new :: ControllerT m r () -> RESTController m rSource

GET /new