License | BSD-3-Clause |
---|---|
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
- data Request k a where
- Query :: FromJSON a => Paths -> QueryString -> Request k a
- PagedQuery :: FromJSON (Vector a) => Paths -> QueryString -> Maybe Count -> Request k (Vector a)
- Command :: FromJSON a => CommandMethod a -> Paths -> ByteString -> Request True a
- StatusQuery :: StatusMap a -> Request k () -> Request k a
- data CommandMethod a where
- Post :: CommandMethod a
- Patch :: CommandMethod a
- Put :: CommandMethod a
- Delete :: CommandMethod ()
- toMethod :: CommandMethod a -> Method
- data StatusMap a where
- data MergeResult
- type Paths = [String]
- class IsPathPart a where
- toPathPart :: a -> String
- type QueryString = [(ByteString, Maybe ByteString)]
- type Count = Int
Documentation
Github request data type.
k
describes whether authentication is required. It's required for non-GET
requests.a
is the result type
Query :: FromJSON a => Paths -> QueryString -> Request k a | |
PagedQuery :: FromJSON (Vector a) => Paths -> QueryString -> Maybe Count -> Request k (Vector a) | |
Command :: FromJSON a => CommandMethod a -> Paths -> ByteString -> Request True a | |
StatusQuery :: StatusMap a -> Request k () -> Request k a |
data CommandMethod a where Source
Http method of requests with body.
Post :: CommandMethod a | |
Patch :: CommandMethod a | |
Put :: CommandMethod a | |
Delete :: CommandMethod () |
Eq (CommandMethod a) Source | |
Show (CommandMethod a) Source | |
Hashable (CommandMethod a) Source |
toMethod :: CommandMethod a -> Method Source
Status code transform
data MergeResult Source
Result of merge operation
class IsPathPart a where Source
toPathPart :: a -> String Source
IsPathPart (Name a) Source | |
IsPathPart (Id a) Source |
type QueryString = [(ByteString, Maybe ByteString)] Source