Skip to main content
Module

x/shed/index.ts>acceptsEncodings

All Worker Tools under a single roof
Latest
function acceptsEncodings
import { acceptsEncodings } from "https://deno.land/x/shed@v0.1.0-pre.10/index.ts";

Determines if a request body content encoding is acceptable to this endpoint.

Type Parameters

T extends string
TS extends readonly T[]

Parameters

encodings: TS

The body encodings acceptable to this endpoint.

Returns

<X extends Context>(ax: Awaitable<X>) => Promise<X & AcceptedEncoding<TS[number]>>