Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fileserver/src/deps.ts>contentType

A file-server command.
Latest
function contentType
import { contentType } from "https://deno.land/x/fileserver@1.1.19/src/deps.ts";

Given an extension or media type, return the full Content-Type header string. Returns undefined if not resolvable.

Parameters

str: string

Returns

string | undefined