import { redirectRequest } from "https://deno.land/x/fathym_common@v0.2.166/src/common/http/redirectRequest.ts";
Redirects the request to a new location with the specified status code.
Examples
From direct import
From direct import
import { redirectRequest } from "@fathym/common/http";
const resp = redirectRequest("/new-location", 301);
From common import
From common import
import { redirectRequest } from "@fathym/common";
const resp = redirectRequest("/new-location", 301);
Redirects the request to a new location with flags for permanent and preserve.
Examples
From direct import
From direct import
import { redirectRequest } from "@fathym/common/http";
const resp = redirectRequest("/new-location", false, true);
From common import
From common import
import { redirectRequest } from "@fathym/common";
const resp = redirectRequest("/new-location", false, true);