Redirect extension

Redirect helpers attached to HttpRequest.

These methods are convenience wrappers around HttpResponse.redirect and encode common framework redirect targets.

Example:

request.redirectToLogin();
on

Methods

redirectBack() → void

Available on HttpRequest, provided by the Redirect extension

Redirects the client back to the referring URL.
redirectHome() → void

Available on HttpRequest, provided by the Redirect extension

Redirects the client to /.
redirectTo({String path = "/"}) → void

Available on HttpRequest, provided by the Redirect extension

Redirects the client to the provided path.
redirectToDashboard() → void

Available on HttpRequest, provided by the Redirect extension

Redirects the client to /user/dashboard.
redirectToLogin() → void

Available on HttpRequest, provided by the Redirect extension

Redirects the client to /login.