Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

acceptsEncodings

import { acceptsEncodings } from "https://raw.githubusercontent.com/worker-tools/middleware/master/index.ts";

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

function acceptsEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & AcceptedEncoding<TS[number]>>;
§
acceptsEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & AcceptedEncoding<TS[number]>>
[src]

§Type Parameters

§
T extends string
[src]
§
TS extends readonly T[]
[src]

§Parameters

§
encodings: TS
[src]

The body encodings acceptable to this endpoint.

§Return Type

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