Skip to main content
Module

x/drash/tests/deps.ts>Drash.Request#accepts

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method Drash.Request.prototype.accepts
import { Drash } from "https://deno.land/x/drash@v2.7.0/tests/deps.ts";
const { Request } = Drash;

Check if the content type in question are accepted by the request.

Parameters

contentType: string
  • A proper MIME type. See /src/dictionaries/mime_db.ts for proper MIME types that Drash can handle.

Returns

boolean

True if yes, false if no.