x/oak/request.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
method Request.prototype.acceptsLanguages
import { Request } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/request.ts?p=prototype.acceptsLanguages&s=Request";

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[src]

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[][src]

Returns

string | undefined[src]