Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/wmill/deps.ts>Router#redirect

Open-source developer platform to turn scripts into workflows and UIs. Fastest workflow engine (5x vs Airflow). Open-source alternative to Airplane and Retool.
Go to Latest
method Router.prototype.redirect
import { Router } from "https://deno.land/x/wmill@v1.354.0/deps.ts";

Register a direction middleware, where when the source path is matched the router will redirect the request to the destination path. A status of 302 Found will be set by default.

The source and destination can be named routes.

Parameters

source: string
destination: string | URL
optional
status: RedirectStatus = [UNSUPPORTED]