object ContentType
- Alphabetic
- By Inheritance
- ContentType
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- 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)
- 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.
- 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.
- 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.
- 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
- def apply(mediaType: MediaType, charset: () => HttpCharset): ContentType
- def apply(mediaType: WithOpenCharset, charset: HttpCharset): WithCharset
- implicit def apply(mediaType: MediaType.WithFixedCharset): WithFixedCharset
- implicit def apply(mediaType: MediaType.Binary): Binary
- 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. ReturnsRight(contentType)
if successful andLeft(errors)
otherwise. - def unapply(contentType: ContentType): Option[(MediaType, Option[HttpCharset])]