InvariantOps

org.http4s.Media$.InvariantOps
final implicit class InvariantOps[F[_]](self: Media[F]) extends AnyVal

Attributes

Source
Media.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

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 parameters

A

type of the result

Value parameters

decoder

EntityDecoder used to decode the Media

Attributes

Returns

the effect which will generate the A

Source
Media.scala
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 parameters

T

type of the result

Value parameters

decoder

EntityDecoder used to decode the Media

Attributes

Returns

the effect which will generate the DecodeResult[T]

Source
Media.scala