Skip to main content
This release is 7 versions behind 17.1.4 — the latest version of @oak/oak. Jump to latest

@oak/oak@16.0.0
Built and signed on GitHub Actions

A middleware framework for handling HTTP with Deno, Node.js, Bun and Cloudflare Workers 🐿️🦕🥟⚙️

This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
10 months ago (16.0.0)
interface RouterAllowedMethodsOptions

Options which can be specified when calling the .allowedMethods() method on a Router instance.

Properties

optional
throw: boolean

When dealing with a non-implemented method or a method not allowed, throw an error instead of setting the status and header for the response.

Methods

optional
methodNotAllowed(): any

Use the value returned from this function instead of an HTTP error MethodNotAllowed.

optional
notImplemented(): any

Use the value returned from this function instead of an HTTP error NotImplemented.

Add Package

deno add jsr:@oak/oak

Import symbol

import { type RouterAllowedMethodsOptions } from "@oak/oak";

---- OR ----

Import directly with a jsr specifier

import { type RouterAllowedMethodsOptions } from "jsr:@oak/oak";

Add Package

npx jsr add @oak/oak

Import symbol

import { type RouterAllowedMethodsOptions } from "@oak/oak";

Add Package

yarn dlx jsr add @oak/oak

Import symbol

import { type RouterAllowedMethodsOptions } from "@oak/oak";

Add Package

pnpm dlx jsr add @oak/oak

Import symbol

import { type RouterAllowedMethodsOptions } from "@oak/oak";

Add Package

bunx jsr add @oak/oak

Import symbol

import { type RouterAllowedMethodsOptions } from "@oak/oak";