Skip to main content
Module

x/http_utils/method.ts>isRetrieveMethod

HTTP utility collection for Fetch API
Go to Latest
function isRetrieveMethod
import { isRetrieveMethod } from "https://deno.land/x/http_utils@1.0.0-beta.15/method.ts";

Whether the method is RetrieveMethod or not.

Examples

Example 1

import { isRetrieveMethod } from "https://deno.land/x/http_utils@$VERSION/mod.ts";
import { assert } from "https://deno.land/std@$VERSION/testing/asserts.ts";

assert(isRetrieveMethod("GET"));
assert(isRetrieveMethod("HEAD"));
assert(!isRetrieveMethod("POST"));

Parameters

method: string

Any method