Skip to main content
Latest
method oak.Request.prototype.accepts
import { oak } from "https://deno.land/x/create_react_app@v0.1.2/deps.ts";
const { Request } = oak;

Returns an array of media types, accepted by the requestor, in order of preference. If there are no encodings supplied by the requestor, undefined is returned.

Returns

string[] | undefined

For a given set of media types, return the best match accepted by the requestor. If there are no encoding that match, then the method returns undefined.

Parameters

...types: string[]

Returns

string | undefined