hasMediaType method

bool hasMediaType(
  1. String mediaType
)

Returns whether this context has the given media type, ignoring case and extra parameters.

Implementation note: Use MediaType to handle the comparison to avoid edge cases.

Implementation

bool hasMediaType(String mediaType) => hasAnyOfMediaTypes([mediaType]);