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

x/doa/deps.ts

A middleware framework for Deno's http serve🦕. Transplanted from Koa with ❤️
Latest
import * as doa from "https://deno.land/x/doa@v1.0.0/deps.ts";

Classes

Create a new Accepts object for the given headers.

c
HttpError
abstract

Enums

HTTP status codes

Variables

A default TextEncoder instance

Functions

Append a field to a vary header.

Make an assertion, if not true, then throw.

Converts given base64url encoded data back to original

Converts given data with base64url encoding. Removes paddings '='.

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

Create a new HttpError.

Set the cookie header properly in the Response to delete it

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

Parse the cookies of the Server Request

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

Parse or format the given val.

Parse media type to object.

Create a HTTP server

Create an HTTPS server with given options

Set the cookie header properly in the Response

Mark that a request is varied on a header field.

Interfaces

Interface of HTTP server response. If body is a Reader, response would be chunked. If body is a string, it would be UTF-8 encoded by default.

Type Aliases

Options for creating an HTTP server.

Options for creating an HTTPS server.