Module

x/opine/deps.ts

Fast, minimalist web framework for Deno ported from ExpressJS.
Go to Latest
import * as mod from "https://dotland.deno.dev/x/opine@2.2.0/deps.ts";

Classes

Create a new Accepts object for the given headers.

The EventEmitter class is defined and exposed by the events module:

Used to construct an HTTP server.

Enums

Enum of HTTP status codes.

Variables

Map from status code to status text.

Functions

Given a media type return any default charset string. Returns undefined if not resolvable.

Given an extension or media type, return the full Content-Type header string. Returns undefined if not resolvable.

Set the cookie header with empty value in the headers to delete it

Encode a URL to a percent-encoded form, excluding already-encoded sequences.

Escape special characters in the given string of text.

Check if a request's header has a request body. A request with a body must either have transfer-encoding or content-length headers set. http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3

Given an extension, lookup the appropriate media type for that extension. Likely you should be using contentType() though instead.

Parses a URL query string into a collection of key and value pairs.

Create a ReadableStream<Uint8Array> from from a Deno.Reader.

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

Create a Reader from a ReadableStreamDefaultReader.

Set the cookie header properly in the headers

Check if the incoming request's header contains the "Content-Type" header field, and it contains any of the give mime types. If there is no request body, null is returned. If there is no content type, false is returned. Otherwise, it returns the first type that matches.

Mark that a request is varied on a header field.

Interfaces

Information about the connection a request arrived on.