Media

trait Media[F[_]]
Companion
object
class Object
trait Matchable
class Any
trait Message[F]
class Request[F]
class Response[F]
class Part[F]

Value members

Abstract methods

def body: EntityBody[F]
def covary[F2[x]]: Media[F2]

Concrete methods

final def as[A](implicit F: MonadThrow[F], decoder: EntityDecoder[F, A]): F[A]

Decode the Media to the specified type

Decode the Media to the specified type

If no valid Status has been described, allow Ok

Type Params
A

type of the result

Value Params
decoder

EntityDecoder used to decode the Media

Returns

the effect which will generate the A

final def attemptAs[T](implicit decoder: EntityDecoder[F, T]): DecodeResult[F, T]

Decode the Media to the specified type

Decode the Media to the specified type

Type Params
T

type of the result

Value Params
decoder

EntityDecoder used to decode the Media

Returns

the effect which will generate the DecodeResult[T]

final def bodyText(implicit RT: RaiseThrowable[F], defaultCharset: Charset): Stream[F, String]
final def charset: Option[Charset]
final def contentLength: Option[Long]
final def contentType: Option[Content-Type]