servant-matrix-param-0.3.3: Matrix parameter combinator for servant

Safe HaskellSafe
LanguageHaskell2010

Servant.MatrixParam

Synopsis

Documentation

data WithMatrixParams path paramSpecs Source #

A static path followed by one or more matrix parameters.

data CaptureWithMatrixParams path captureType paramSpecs Source #

A capture followed by one or more matrix parameters.

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]