function redirectRequestimport { redirectRequest } from "https://deno.land/x/fathym_common@v0.2.147-integration/src/common/http/redirectRequest.ts"; redirectRequest(location: string,status: number,req?: Request,respHeaders?: Headers,): ResponseRedirects the request to a new location with the specified status code. redirectRequest(location: string,preserve: boolean,permanent: boolean,reqResp?: Request,respHeaders?: Headers,): ResponseRedirects the request to a new location with flags for permanent and preserve. Redirects the request to a new location with the specified status code. ExamplesFrom direct import import { redirectRequest } from "@fathym/common/http"; const resp = redirectRequest("/new-location", 301); From common import import { redirectRequest } from "@fathym/common"; const resp = redirectRequest("/new-location", 301); Parameterslocation: stringThe location to redirect to. status: numberThe HTTP status code to use for the redirect. optionalreq: RequestThe base request for relative redirect. optionalrespHeaders: HeadersThe additional response headers for the redirect. ReturnsResponseThe redirected response. Redirects the request to a new location with flags for permanent and preserve. ExamplesFrom direct import import { redirectRequest } from "@fathym/common/http"; const resp = redirectRequest("/new-location", false, true); From common import import { redirectRequest } from "@fathym/common"; const resp = redirectRequest("/new-location", false, true); Parameterslocation: stringThe location to redirect to. preserve: booleanWhether to preserve the original request headers. permanent: booleanWhether the redirect should be permanent. optionalreqResp: RequestThe base request for relative redirect. optionalrespHeaders: HeadersThe additional response headers for the redirect. ReturnsResponseThe redirected response.