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

x/http_graphql_playground/deps.ts>accepts

HTTP request for graphql-playground with standard Request and Response
Latest
function accepts
import { accepts } from "https://deno.land/x/http_graphql_playground@1.0.0-beta.1/deps.ts";

Returns an array of media types accepted by the request, in order of preference. If there are no media types supplied in the request, then any media type selector will be returned.

Returns

string[]

For a given set of media types, return the best match accepted in the request. If no media type matches, then the function returns undefined.

Parameters

request: Request
...types: string[]

Returns

string | undefined