Skip to main content
Module

x/drash/tests/deps.ts>Drash.Resource

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
class Drash.Resource
implements [[Drash.Interfaces].IResource]
import { Drash } from "https://deno.land/x/drash@v2.7.0/tests/deps.ts";
const { Resource } = Drash;

This is the base resource class for all resources. All resource classes must extend this base resource class.

Drash defines a resource according to the MDN at the following page:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web

Properties

protected
drash_resource: boolean

Internal property used to identify this as a Drash resource.

paths: string[]

Methods

redirect(
location: string,
response: Drash.Response,
status?,
): void

Redirect the incoming request to another resource