Copyright(c) digitally induced GmbH 2020
Safe HaskellNone

IHP.Controller.Redirect

Description

 
Synopsis

Documentation

redirectTo :: (?requestContext :: RequestContext, FrameworkConfig, HasPath action) => action -> IO () Source #

Redirects to an action

Example:

redirectTo ShowProjectAction { projectId = get #id project }

Use redirectToPath if you want to redirect to a non-action url.

redirectToPath :: (?requestContext :: RequestContext, FrameworkConfig) => Text -> IO () Source #

Redirects to a path (given as a string)

Example:

redirectToPath "/blog/wp-login.php"

Use redirectTo if you want to redirect to a controller action.

redirectToUrl :: (?requestContext :: RequestContext, FrameworkConfig) => Text -> IO () Source #

Redirects to a url (given as a string)

Example:

redirectToUrl "https://example.com/hello-world.html"

Use redirectToPath if you want to redirect to a relative path like "/hello-world.html"