Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/opine/src/response.ts>Response#location

Minimalist web framework for Deno ported from ExpressJS.
Latest
method Response.prototype.location
import { Response } from "https://deno.land/x/opine@2.3.4/src/response.ts";

Set the location header to url.

The given url can also be "back", which redirects to the Referrer or Referer headers or "/".

Examples:

res.location('/foo/bar').; res.location('http://example.com'); res.location('../login');

Parameters

url: string

Returns

this

for chaining