MediaType

trait MediaType

Standardized type for Content-Type header value.

See also

scamper.http.headers.ContentType

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def mainType: String

Gets main type of media type.

Gets main type of media type.

def params: Map[String, String]

Gets media type parameters.

Gets media type parameters.

def subtype: String

Gets subtype of media type.

Gets subtype of media type.

Concrete methods

def isApplication: Boolean

Tests main type for application.

Tests main type for application.

def isAudio: Boolean

Tests main type for audio.

Tests main type for audio.

def isFont: Boolean

Tests main type for font.

Tests main type for font.

def isImage: Boolean

Tests main type for image.

Tests main type for image.

def isMessage: Boolean

Tests main type for message.

Tests main type for message.

def isMultipart: Boolean

Tests main type for multipart.

Tests main type for multipart.

def isText: Boolean

Tests main type for text.

Tests main type for text.

def isVideo: Boolean

Tests main type for video.

Tests main type for video.

def setParams(params: Map[String, String]): MediaType

Creates media types with new parameters.

Creates media types with new parameters.

def setParams(params: (String, String)*): MediaType

Creates media types with new parameters.

Creates media types with new parameters.

def toRange(weight: Float): MediaRange

Converts to range with supplied weight.

Converts to range with supplied weight.

Concrete fields

lazy override
val toString: String

Returns formatted media type.

Returns formatted media type.