snap-web-routes-0.4.0.0: Type safe URLs for Snap

Safe HaskellNone

Snap.Snaplet.Router.URL

Synopsis

Documentation

urlPathSource

Arguments

:: (HasRouter m, PathInfo (URL m)) 
=> URL m

URL data type

-> m Path

Path of route

Returns the path for the given URL

urlPathParamsSource

Arguments

:: (HasRouter m, PathInfo (URL m)) 
=> URL m

URL data type

-> [(Text, Maybe Text)]

Params

-> m Path

Path of route with params as query string

Returns the path with query string for the given URL and params

redirectURLSource

Arguments

:: (HasRouter m, MonadSnap m, PathInfo (URL m)) 
=> URL m

URL data type

-> m () 

Redirect to the path for the given URL

redirectURLParamsSource

Arguments

:: (HasRouter m, MonadSnap m, PathInfo (URL m)) 
=> URL m

URL data type

-> [(Text, Maybe Text)]

Params

-> m () 

Redirect to the path for the given URL with params as query string