Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utility and base types and functions for the Discord Rest API
Synopsis
- baseUrl :: Url 'Https
- authHeader :: Auth -> Option 'Https
- (//) :: Show a => Url scheme -> a -> Url scheme
- data JsonRequest where
- Delete :: Url 'Https -> Option 'Https -> JsonRequest
- Get :: Url 'Https -> Option 'Https -> JsonRequest
- Put :: HttpBody a => Url 'Https -> a -> Option 'Https -> JsonRequest
- Patch :: HttpBody a => Url 'Https -> RestIO a -> Option 'Https -> JsonRequest
- Post :: HttpBody a => Url 'Https -> RestIO a -> Option 'Https -> JsonRequest
- class Request a where
- majorRoute :: a -> String
- jsonRequest :: a -> JsonRequest
- newtype RestIO a = RestIO {
- restIOtoIO :: IO a
Documentation
data JsonRequest where Source #
Represtents a HTTP request made to an API that supplies a Json response
Delete :: Url 'Https -> Option 'Https -> JsonRequest | |
Get :: Url 'Https -> Option 'Https -> JsonRequest | |
Put :: HttpBody a => Url 'Https -> a -> Option 'Https -> JsonRequest | |
Patch :: HttpBody a => Url 'Https -> RestIO a -> Option 'Https -> JsonRequest | |
Post :: HttpBody a => Url 'Https -> RestIO a -> Option 'Https -> JsonRequest |
class Request a where Source #
majorRoute :: a -> String Source #
jsonRequest :: a -> JsonRequest Source #