providesEncodings
import { providesEncodings } from "https://raw.githubusercontent.com/worker-tools/middleware/master/index.ts";
Performs content negotiation over the content encoding of the response.
function providesEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & ContentEncoding<TS[number]>>;
§
providesEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & ContentEncoding<TS[number]>>
[src]