hyperbole-0.5.0: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellNone
LanguageGHC2021

Web.Hyperbole.Effect.Response

Synopsis

Documentation

hyperView :: forall id (es :: [Effect]). HyperView id es => id -> View id () -> Eff es Response Source #

Respond with the given hyperview

respondError :: forall (es :: [Effect]) a. Hyperbole :> es => ResponseError -> Eff es a Source #

Abort execution and respond with an error

respondErrorView :: forall (es :: [Effect]) a. Hyperbole :> es => Text -> View Body () -> Eff es a Source #

Abort execution and respond with an error view

notFound :: forall (es :: [Effect]) a. Hyperbole :> es => Eff es a Source #

Abort execution and respond with 404 Not Found

#EMBED ExampleDocsApp.hs findUser

#EMBED ExampleDocsApp.hs userPage

parseError :: forall (es :: [Effect]) a. Hyperbole :> es => String -> Eff es a Source #

Respond immediately with a parse error

redirect :: forall (es :: [Effect]) a. Hyperbole :> es => URI -> Eff es a Source #

Abort execution and redirect to a URI

view :: View Body () -> Response Source #

Respond with a generic view. Normally you will return a view from the page or handler instead of using this function