Skip to main content
Module

x/create_react_app/deps.ts>oak

Create React App with Deno
Latest
namespace oak
import { oak } from "https://deno.land/x/create_react_app@v0.1.2/deps.ts";

Classes

A class which registers middleware (via .use()) and then processes inbound requests against that middleware (via .listen()).

Provides context about the current request and response to middleware functions.

An interface which allows setting and accessing cookies related to both the current request and response.

A class which provides an interface to access the fields of a multipart/form-data body.

A base class for individual classes of HTTP errors.

An interface which provides information about the current request.

An interface to control what response will be sent when the middleware finishes processing the request.

An interface for registering middleware that will run when certain HTTP methods and paths are requested, as well as provides a way to parameterize parts of the requested path.

An event which contains information which will be sent to the remote connection and be made available in an EventSource as an event.

Enums

HTTP status codes

Variables

An object which contains an individual HTTP Error for each HTTP status error code (4XX and 5XX). When errors are raised related to a particular HTTP status code, they will be of the appropriate instance located on this object. Also, context's .throw() will throw errors based on the passed status code.

A symbol that indicates to response.redirect() to attempt to redirect back to the request referrer. For example:

Functions

Compose multiple middleware functions into a single middleware function.

Given a context, return the .request.url.searchParams as a Map of keys and values of the params.

Determines if a HTTP Status is an ErrorStatus (4XX or 5XX).

Determines if a HTTP Status is a RedirectStatus (3XX).

Asynchronously fulfill a response with a file from the local file system.

Interfaces

Middleware are functions which are chained together to deal with requests.

The context passed router middleware.

Middleware that will be called by the router when handling a specific parameter, which the middleware will be called when a request matches the route parameter.

An interface that aligns to the parts of std/http/server's ServerRequest that actually is consumed by oak.

An interface that aligns to what oak returns and is compatible with std/http/server's request.respond().