| License | BSD-3-Clause |
|---|---|
| Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
| Safe Haskell | None |
| Language | Haskell2010 |
GitHub.Data.Request
Description
- 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.
kdescribes whether authentication is required. It's required for non-GETrequests.ais the result type
Constructors
| 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.
Constructors
| Post :: CommandMethod a | |
| Patch :: CommandMethod a | |
| Put :: CommandMethod a | |
| Delete :: CommandMethod () |
Instances
| Eq (CommandMethod a) Source | |
| Show (CommandMethod a) Source | |
| Hashable (CommandMethod a) Source |
toMethod :: CommandMethod a -> Method Source
Status code transform
Constructors
| StatusOnlyOk :: StatusMap Bool | |
| StatusMerge :: StatusMap MergeResult |
data MergeResult Source
Result of merge operation
Constructors
| MergeSuccessful | |
| MergeCannotPerform | |
| MergeConflict |
class IsPathPart a where Source
Methods
toPathPart :: a -> String Source
Instances
| IsPathPart (Name a) Source | |
| IsPathPart (Id a) Source |
type QueryString = [(ByteString, Maybe ByteString)] Source