Safe Haskell | None |
---|---|
Language | Haskell98 |
- class Get r where
- get :: r
- class Get0 r where
- get0 :: MonadThrow m => TwilioT m r
- class Get1 a r where
- get1 :: MonadThrow m => a -> TwilioT m r
- class Post r where
- post :: r
- class Post0 r where
- post0 :: MonadThrow m => TwilioT m r
- class Post1 a r where
- post1 :: MonadThrow m => a -> TwilioT m r
- class Post2 a b r where
- post2 :: MonadThrow m => a -> b -> TwilioT m r
- class Post3 a b c r where
- post3 :: MonadThrow m => a -> b -> c -> TwilioT m r
- parseJSONFromResponse :: (FromJSON a, MonadThrow m) => Response ByteString -> m a
Documentation
This module repackages functionality exposed by MonadRequest
into a
set of classes that REST resources can easily consume. It also provides
functions get
and post
that work well with type inference.
Get
represents REST resources that support HTTP GET requests with any number of arguments.
Get0
represents REST resources that support HTTP GET requests with 0 arguments.
get0 :: MonadThrow m => TwilioT m r Source
Get1
represents REST resources that support HTTP GET requests with 1 argument.
get1 :: MonadThrow m => a -> TwilioT m r Source
Post
represents REST resources that support HTTP POST requests with any number of arguments.
(MonadThrow m, Post3 a b c r) => Post (a -> b -> c -> TwilioT m r) | |
(MonadThrow m, Post2 a b r) => Post (a -> b -> TwilioT m r) | |
(MonadThrow m, Post1 a r) => Post (a -> TwilioT m r) | |
(MonadThrow m, Post0 r) => Post (TwilioT m r) |
Post0
represents REST resources that support HTTP POST requests with 0 arguments.
post0 :: MonadThrow m => TwilioT m r Source
Post1
represents REST resources that support HTTP POST requests with 1 argument.
post1 :: MonadThrow m => a -> TwilioT m r Source
class Post2 a b r where Source
Post2
represents REST resources that support HTTP POST requests with 2 arguments.
post2 :: MonadThrow m => a -> b -> TwilioT m r Source
class Post3 a b c r where Source
Post3
represents REST resources that support HTTP POST requests with 3 arguments.
post3 :: MonadThrow m => a -> b -> c -> TwilioT m r Source
parseJSONFromResponse :: (FromJSON a, MonadThrow m) => Response ByteString -> m a Source