Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Capture (sym :: Symbol) a
- data CaptureAll (sym :: Symbol) a
Documentation
data Capture (sym :: Symbol) a Source #
Capture a value from the request path under a certain type a
.
Example:
>>>
-- GET /books/:isbn
>>>
type MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book
data CaptureAll (sym :: Symbol) a Source #
Capture all remaining values from the request path under a certain type
a
.
Example:
>>>
-- GET /src/*
>>>
type MyAPI = "src" :> CaptureAll "segments" Text :> Get '[JSON] SourceFile