HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Moduleservant-0.20.3.0Haskell2010

Servant.API.Capture

  • 3 types
  • Packageservant-0.20.3.0
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCapture.hs
typetype Capture = Capture' '[]
#

Capture a value from the request path under a certain type a.

Example:

Example2 expressions
-- GET /books/:isbntype MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book
datadata CaptureAll (sym :: Symbol) a
#

Capture all remaining values from the request path under a certain type a.

Example:

Example2 expressions
-- GET /src/*type MyAPI = "src" :> CaptureAll "segments" Text :> Get '[JSON] SourceFile
Instances2HasLink, MkLink