simple-0.11.2: 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

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