Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.
oakserverPublic archive

About

[ARCHIVED] A set of APIs for handling HTTP and HTTPS requests with Deno 🐿️ 🦕. Retired 2026-11-03 following the retirement of Deno — same rationale as oak and acorn. There is no successor module. Published versions remain on JSR and deno.land/x and pinned imports keep resolving, but there are no fixes or support. Not for new projects.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oak commons

Warning

oak commons is retired and this repository is archived (2026-11-03).

Following the retirement of Deno, oak commons is retired and unmaintained — the same rationale as oak and acorn. There is no replacement or successor module. There will be no further releases, bug fixes or security patches. Existing releases remain available unchanged on JSR and deno.land/x, so existing pinned imports will continue to resolve — but there will be no fixes, no compatibility work for future runtimes, and no support, and oak commons should not be used in new projects. The documentation below is retained for reference. Thank you to everyone who contributed to and used oak commons.

jsr.io/@oak/commons jsr.io/@oak/commons score deno.land/x/oak_commons

ci codecov

A set of APIs that are common to HTTP/HTTPS servers.

Note

Originally most of this code was contributed to the Deno standard library but the maintainers after accepting the contributions have moved to remove this code, so I had to resurrect this library to be able to provide common HTTP functionality.

Each module is designed to be largely independent of other modules, with as few shared dependencies as reasonable. These modules are designed as building blocks for more complex HTTP/HTTPS and server frameworks.

The acorn (a RESTful services framework) and oak are examples of something built on top of oak commons.

Usage

Each module/export is designed to be as independent as possible and there is no top level export, so each area of functionality needs to be imported. For example, to use status would look something like this:

import { STATUS_CODE, STATUS_TEXT } from "jsr:@oak/commons/status";

console.log(STATUS_CODE.NotFound); // Returns 404
console.log(STATUS_TEXT[STATUS_CODE.NotFound]); // Returns "Not Found"

Documentation

The inline documentation for each modules is the best guide on the usage of the APIs:

  • /assert - an assertion function that throws HTTP errors when the assertion fails.
  • /cookie_map - an API for managing signed and unsigned cookies server side.
  • /form_data - the ability to parse a stream body into FormData when this functionality isn't available in the runtime.
  • /forwarded - a parser for the Forwarded header vale.
  • /http_errors - utilities for working with HTTP Error status as JavaScript errors.
  • /keystack - a key ring implementation to allow for management of rotating encryption keys.
  • /media_types - utilities for working with media types from a request.
  • /method - utilities for working with HTTP methods/verbs in a type safe way.
  • /range - utilities for supporting range requests.
  • /server_sent_event - an abstraction for managing server sent events like DOM events.
  • /status - utilities for working with HTTP statuses in a type safe way.

Copyright 2018 - 2025 the oak authors. All rights reserved. MIT License.

About

[ARCHIVED] A set of APIs for handling HTTP and HTTPS requests with Deno 🐿️ 🦕. Retired 2026-11-03 following the retirement of Deno — same rationale as oak and acorn. There is no successor module. Published versions remain on JSR and deno.land/x and pinned imports keep resolving, but there are no fixes or support. Not for new projects.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages