implicit final class ContentLength[T <: HttpMessage] extends AnyVal
Provides standardized access to Content-Length header.
- Alphabetic
- By Inheritance
- ContentLength
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ContentLength(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
contentLength: Long
Gets Content-Length header value.
Gets Content-Length header value.
- Exceptions thrown
HeaderNotFound
if Content-Length is not present
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
getContentLength: Option[Long]
Gets Content-Length header value if present.
-
def
hasContentLength: Boolean
Tests whether Content-Length header is present.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val message: T
-
def
removeContentLength()(implicit ev: <:<[T, MessageBuilder[T]]): T
Creates new message removing Content-Length header.
-
def
toString(): String
- Definition Classes
- Any
-
def
withContentLength(value: Long)(implicit ev: <:<[T, MessageBuilder[T]]): T
Creates new message setting Content-Length header to supplied value.