ContentType.isType

Compares the given type and subtype with that of the given mime type object.

class ContentType
bool
isType
(
string type
,
string subtype
)

Parameters

type string

MIME type to compare against

subtype string

MIME subtype to compare against

Return Value

Type: bool

true if the MIME types match or false otherwise. You may use "*" in place of type and/or subtype as a wilcard.