Skip to main content
Module

x/mandarinets/deps.ts>Response#redirect

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
method Response.prototype.redirect
import { Response } from "https://deno.land/x/mandarinets@v2.3.2/deps.ts";

Sets the response to redirect to the supplied url.

If the .status is not currently a redirect status, the status will be set to 302 Found.

The body will be set to a message indicating the redirection is occurring.

Parameters

url: string | URL

Sets the response to redirect back to the referrer if available, with an optional alt URL if there is no referrer header on the request. If there is no referrer header, nor an alt parameter, the redirect is set to /.

If the .status is not currently a redirect status, the status will be set to 302 Found.

The body will be set to a message indicating the redirection is occurring.

Parameters

url: REDIRECT_BACK
optional
alt: string | URL