import * as oakCommons from "https://deno.land/x/oak_commons@1.0.0/method.ts";
Contains the constant HTTP_METHODS
and the type
HttpMethod
and the type guard isHttpMethod
for
working with HTTP methods with type safety.
Examples
Example 1
Example 1
import { isHttpMethod } from "jsr:@oak/commons/method";
console.log(isMethod("GET")); // true
Variables
A constant array of common HTTP methods. |
Functions
A type guard that determines if a value is a valid HTTP method. |
Type Aliases
A type representing string literals of each of the common HTTP method. |