Skip to main content
Module

x/keywork/http/mod.ts

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
import * as keywork from "https://deno.land/x/keywork@v6.0.1/http/mod.ts";

Keywork includes utilities for working with incoming HTTP requests, and extends the native Request class for use with Cloudflare Workers

See each of HTTP's submodules for additional details.

Classes

A client-side cachable response.

An error response sent to a client when a request is deemed to be invalid in some way.

A response that returns a full HTML document.

A response sent to the client containing a JSON object.

Given that a request's etag header matches an server entity or resource, a NotModifiedResponse should be sent to the requestor as an indication that the client's cache is still applicable.

Variables

Determines if the given HTTP status status is a client error.

Determines if the given HTTP status code is informational.

Determines if the given HTTP status status is a redirection.

Determines if the given HTTP status status is a server error.

Determines if the given HTTP status code is successful.

Given a standard uppercase HTTP method verb such as GET, return the router method name.

Given a standardized uppercase method verb such as GET, return the normalized form.

Functions

Infers the appropriate Response constructor for the given ResponseLike body.

Clones a given Response as a mutable instance.

Checks if a given MIME-type is compressible.

Checks if the given object is an instance of Request

Checks if the given object is an instance of Response

Checks if the given object is shaped like a Request

Type Aliases

HTTP method verbs.

An object that has a url property.

Either a full Response, or a more primitive value to be processed.

Normalized HTTP methods in a JavaScript friendly format.