Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/superdeno/test/deps.ts>Oak.Request#acceptsLanguages

Super-agent driven library for testing Deno HTTP servers.
Latest
method Oak.Request.prototype.acceptsLanguages
import { Oak } from "https://deno.land/x/superdeno@4.9.0/test/deps.ts";
const { Request } = Oak;

Returns an array of languages, accepted by the requestor, in order of preference. If there are no languages supplied by the requestor, ["*"] is returned, indicating any language is accepted.

Returns

string[] | undefined

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

Parameters

...langs: string[]

Returns

string | undefined