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 covary[F2[x]]: Media[F2]
def entity: Entity[F]

Concrete methods

def as[A](implicit F: MonadThrow[F], decoder: EntityDecoder[F, A]): F[A]
Implicitly added by InvariantOps

Decode the Media to the specified type

Decode the Media to the specified type

If no valid Status has been described, allow Ok

Type parameters:
A

type of the result

Value parameters:
decoder

EntityDecoder used to decode the Media

Returns:

the effect which will generate the A

def attemptAs[T](implicit decoder: EntityDecoder[F, T]): DecodeResult[F, T]
Implicitly added by InvariantOps

Decode the Media to the specified type

Decode the Media to the specified type

Type parameters:
T

type of the result

Value parameters:
decoder

EntityDecoder used to decode the Media

Returns:

the effect which will generate the DecodeResult[T]

final def body: EntityBody[F]
final def bodyText[F2[x]](implicit RT: RaiseThrowable[F2], defaultCharset: Charset): Stream[F2, String]
final def charset: Option[Charset]