apiary-0.7.0.0: Simple web framework inspired by scotty.

Safe HaskellNone

Control.Monad.Apiary.Filter.Internal.Capture

Synopsis

Documentation

data Equal Source

Constructors

Equal Text 

Instances

class CaptureElem a whereSource

Associated Types

type Next a xs :: [*]Source

Methods

captureElem :: a -> Text -> SList xs -> Maybe (SList (Next a xs))Source

Instances

type family CaptureResult bf as :: [*]Source

capture' :: Capture as => SList as -> [Text] -> SList xs -> Maybe (SList (CaptureResult xs as))Source

capture :: Capture as => SList as -> Apiary (CaptureResult xs as) b -> Apiary xs bSource

low level (without Template Haskell) capture. since 0.4.2.0

 myCapture :: SList '[Equal, Fetch Int, Fetch String]
 myCapture = Equal "path" ::: pInt ::: pString ::: SNil

capture myCapture . stdMethod GET . action $ age name -> do
     yourAction