Skip to main content
Module

x/http_utils/mod.ts>isIdempotentMethod

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

Whether the method is IdempotentMethod or not.

Examples

Example 1

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

assert(isIdempotentMethod("GET"));
assert(isIdempotentMethod("PUT"));
assert(isIdempotentMethod("DELETE"));

Parameters

method: string