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

x/cav/examples/chat/deps.ts>redirect

A server framework for Deno
Go to Latest
function redirect
import { redirect } from "https://deno.land/x/cav@0.2.0-alpha.7/examples/chat/deps.ts";

Creates an Endpoint that always redirects. The "path" schema option is "/", i.e. the whole request path should have been consumed by the containing router(s) before the request reaches a redirect endpoint. If the redirect path doesn't specify an origin, the origin of the request is used. If the path starts with a "./" or a "../", it's joined with the pathname of the Request url to get the final redirect path. The default status is 302.

Parameters

to: string
optional
status: number