servant-0.7: A family of combinators for defining webservices APIs

Safe HaskellSafe
LanguageHaskell2010

Servant.API.Capture

Synopsis

Documentation

data Capture sym 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

Instances

(ToHttpApiData v, HasLink k sub) => HasLink * ((:>) * k (Capture * sym v) sub) Source 
type MkLink * ((:>) * k (Capture * sym v) sub) = v -> MkLink k sub Source