| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Servant.MatrixParam
- data WithMatrixParams path paramSpecs
- data MatrixParam key a
- data MatrixFlag key
Documentation
data WithMatrixParams path paramSpecs Source #
data MatrixParam key a Source #
Expresses matrix parameters for path segments in APIs, e.g.
/books;author=name
would be represented as:
>>>import Servant>>>>>>type MyApi = "books" :> MatrixParam "author" String :> Get '[JSON] [String]
data MatrixFlag key Source #
Lookup a potentially value-less matrix string parameter
with boolean semantics. If the param sym is there without any value,
or if it's there with value "true" or "1", it's interpreted as True.
Otherwise, it's interpreted as False.
/book;published
would be represented as:
>>>import Servant>>>>>>type MyApi = "book" :> MatrixFlag "published" :> Get '[JSON] [String]