Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Common functions for the MS Azure API
Synopsis
- data APIPlane
- get :: FromJSON b => APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req b
- getBs :: APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req ByteString
- getLbs :: APIPlane -> [Text] -> Option 'Https -> AccessToken -> Req ByteString
- post :: (FromJSON b, ToJSON a) => APIPlane -> [Text] -> Option 'Https -> a -> AccessToken -> Req b
- (==:) :: Text -> Text -> Option 'Https
- tryReq :: Req a -> Req (Either HttpException a)
- data Collection a
- aesonOptions :: String -> Options
Documentation
API control planes
APManagement | Management plane ( |
APData Text | Data plane e.g. FileREST API |
GET
:: APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req ByteString |
GET
a ByteString
e.g. a file
:: APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> AccessToken | |
-> Req ByteString |
GET
a ByteString
e.g. a file
:: (FromJSON b, ToJSON a) | |
=> APIPlane | |
-> [Text] | URI path segments |
-> Option 'Https | |
-> a | request body |
-> AccessToken | |
-> Req b |
POST
URL parameters
Helpers
tryReq :: Req a -> Req (Either HttpException a) Source #
Specialized version of try
to HttpException
s
This can be used to catch exceptions of composite Req
statements, e.g. around a do
block
JSON
data Collection a Source #
a collection of items with key value
Instances
drop the prefix and lowercase first character
e.g. userDisplayName
->
displayName