Skip to main content
Module

x/drash/src/http/request.ts>DrashRequest#accepts

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method DrashRequest.prototype.accepts
import { DrashRequest } from "https://deno.land/x/drash@v2.7.0/src/http/request.ts";

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.