minion-0.1.0.1: A Haskell introspectable web router
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Minion.Request.Url

Synopsis

Documentation

capture :: forall b m i ts. (FromHttpApiData b, Introspection i Capture b, MonadThrow m) => Text -> ValueCombinator i (WithPiece b) ts m Source #

Captures one piece of path

capture @Text .> ... 

captures Source #

Arguments

:: forall b m i ts. (FromHttpApiData b, Introspection i Captures b, MonadThrow m) 
=> Text

.

-> ValueCombinator i (WithPieces b) ts m 

Captures the rest of path

captures @Text .> ... 

piece :: String -> Combinator i ts m Source #

Could be omitted with OverloadedStrings

{-# LANGUAGE OverloadedStrings #-} "bar" /> ... 
{-# LANGUAGE NoOverloadedStrings #-} piece "bar" /> ... 

Also splits piece with /, so

piece "foo/bar/bar" == piece "foo" /> piece "bar" /> piece "baz" "foo/bar/baz" == "foo" /> "bar" /> "baz"