Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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/method.ts";

Whether the method is RetrieveMethod or not.

Examples

Example 1

import { isRetrieveMethod } from "https://deno.land/x/http_utils@$VERSION/method.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