Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
REST is a DSL for creating routes using RESTful HTTP verbs. See http://en.wikipedia.org/wiki/Representational_state_transfer
Synopsis
- data REST m s = REST {
- 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 ()
- rest :: Monad m => RESTControllerM m r a -> REST m r
- routeREST :: Monad m => REST m s -> ControllerT s m ()
- index :: ControllerT s m () -> RESTController m s
- show :: ControllerT s m () -> RESTController m s
- create :: ControllerT s m () -> RESTController m s
- update :: ControllerT s m () -> RESTController m s
- delete :: ControllerT s m () -> RESTController m s
- edit :: ControllerT s m () -> RESTController m s
- new :: ControllerT s m () -> RESTController m s
Documentation
Type used to encode a REST controller.
REST | |
|
type RESTController m r = RESTControllerM m r () 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