implicit final class ContentType[T <: HttpMessage] extends AnyVal
Provides standardized access to Content-Type header.
- Alphabetic
- By Inheritance
- ContentType
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ContentType(message: T)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def contentType: MediaType
Gets Content-Type header value.
Gets Content-Type header value.
- Exceptions thrown
HeaderNotFound
if Content-Type is not present
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def getContentType: Option[MediaType]
Gets Content-Type header value if present.
- def hasContentType: Boolean
Tests whether Content-Type header is present.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def removeContentType()(implicit ev: <:<[T, MessageBuilder[T]]): T
Creates new message removing Content-Type header.
- def toString(): String
- Definition Classes
- Any
- def withContentType(value: MediaType)(implicit ev: <:<[T, MessageBuilder[T]]): T
Creates new message setting Content-Type header to supplied value.