Media

org.http4s.Media
See theMedia companion object
trait Media[F[_]]

Attributes

Companion
object
Source
Media.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Part[F]
trait Message[F]
class Request[F]
class Response[F]

Members list

Value members

Abstract methods

def body: EntityBody[F]

Attributes

Source
Media.scala
def covary[F2[x]]: Media[F2]

Attributes

Source
Media.scala

Attributes

Source
Media.scala

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 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
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 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
final def bodyText(implicit RT: RaiseThrowable[F], defaultCharset: Charset): Stream[F, String]

Attributes

Source
Media.scala
final def charset: Option[Charset]

Attributes

Source
Media.scala
final def contentLength: Option[Long]

Attributes

Source
Media.scala

Attributes

Source
Media.scala