object ContentType

Source
ContentType.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ContentType
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Binary(mediaType: MediaType.Binary) extends javadsl.model.ContentType.Binary with ContentType with Product with Serializable

    Represents a content-type which we know not to contain text (will never have have a charset)

  2. sealed trait NonBinary extends javadsl.model.ContentType.NonBinary with ContentType

    Represents a content-type which we know to contain text, and has a specified charset.

  3. final case class WithCharset(mediaType: WithOpenCharset, charset: HttpCharset) extends javadsl.model.ContentType.WithCharset with NonBinary with Product with Serializable

    Represents a content-type which we know to contain text, and the charset is known at runtime.

  4. final case class WithFixedCharset(mediaType: MediaType.WithFixedCharset) extends javadsl.model.ContentType.WithFixedCharset with NonBinary with Product with Serializable

    Represents a content-type which we know to contain text, where the charset always has the same predefined value.

  5. final case class WithMissingCharset(mediaType: WithOpenCharset) extends javadsl.model.ContentType.WithMissingCharset with ContentType with Product with Serializable

    Represents a content-type which we know to contain text, and would be better off having a charset, but the client or server hasn't provided that.

    Represents a content-type which we know to contain text, and would be better off having a charset, but the client or server hasn't provided that. For example, "text/xml" without a charset parameter.

Value Members

  1. def apply(mediaType: MediaType, charset: () => HttpCharset): ContentType
  2. def apply(mediaType: WithOpenCharset, charset: HttpCharset): WithCharset
  3. implicit def apply(mediaType: MediaType.WithFixedCharset): WithFixedCharset
  4. implicit def apply(mediaType: MediaType.Binary): Binary
  5. def parse(value: String): Either[List[ErrorInfo], ContentType]

    Tries to parse a ContentType value from the given String.

    Tries to parse a ContentType value from the given String. Returns Right(contentType) if successful and Left(errors) otherwise.

  6. def unapply(contentType: ContentType): Option[(MediaType, Option[HttpCharset])]