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

Concise view

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

Attributes

A

type of the result

decoder

EntityDecoder used to decode the Media

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

Attributes

T

type of the result

decoder

EntityDecoder used to decode the Media

Returns:

the effect which will generate the DecodeResult[T]

Source:
Media.scala