EntityEncoder

org.http4s.EntityEncoder
See theEntityEncoder companion trait
object EntityEncoder

Attributes

Companion
trait
Source
EntityEncoder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object Pure

Attributes

Source
EntityEncoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Pure.type

Types

type Pure[A] = EntityEncoder[Pure, A]

Attributes

Source
EntityEncoder.scala

Value members

Concrete methods

def apply[F[_], A](implicit ev: EntityEncoder[F, A]): EntityEncoder[F, A]

summon an implicit EntityEncoder

summon an implicit EntityEncoder

Attributes

Source
EntityEncoder.scala
def emptyEncoder[A]: Pure[A]

Attributes

Source
EntityEncoder.scala
def encodeBy[F[_], A](hs: Headers)(f: A => Entity[F]): EntityEncoder[F, A]

Create a new EntityEncoder

Create a new EntityEncoder

Attributes

Source
EntityEncoder.scala
def encodeBy[F[_], A](hs: ToRaw*)(f: A => Entity[F]): EntityEncoder[F, A]

Create a new EntityEncoder

Create a new EntityEncoder

Attributes

Source
EntityEncoder.scala
def showEncoder[A](implicit charset: Charset, show: Show[A]): Pure[A]

Encodes a value from its Show instance.

Encodes a value from its Show instance. Too broad to be implicit, too useful to not exist.

Attributes

Source
EntityEncoder.scala

Create a new EntityEncoder

Create a new EntityEncoder

This constructor is a helper for types that can be serialized synchronously, for example a String.

Attributes

Source
EntityEncoder.scala

Implicits

Implicits

implicit val byteArrayEncoder: Pure[Array[Byte]]

Attributes

Source
EntityEncoder.scala

Attributes

Source
EntityEncoder.scala
implicit def charArrayEncoder(implicit charset: Charset): Pure[Array[Char]]

Attributes

Source
EntityEncoder.scala
implicit val chunkEncoder: Pure[Chunk[Byte]]

Attributes

Source
EntityEncoder.scala
implicit def entityBodyEncoder[F[_]]: EntityEncoder[F, Stream[F, Byte]]

Encodes an entity body.

Encodes an entity body. Chunking of the stream is preserved. A Transfer-Encoding: chunked header is set, as we cannot know the content length without running the stream.

Attributes

Source
EntityEncoder.scala
implicit def entityEncoderContravariant[F[_]]: Contravariant[[_] =>> EntityEncoder[F, _$16]]

Attributes

Source
EntityEncoder.scala
implicit def inputStreamEncoder[F[_] : Sync, IS <: InputStream]: EntityEncoder[F, F[IS]]

Attributes

Source
EntityEncoder.scala
implicit def multipartEncoder[F[_]]: EntityEncoder[F, Multipart[F]]

Attributes

Source
EntityEncoder.scala
implicit def pathEncoder[F[_] : Files]: EntityEncoder[F, Path]

Attributes

Source
EntityEncoder.scala
implicit def readerEncoder[F[_], R <: Reader](implicit F: Sync[F], charset: Charset): EntityEncoder[F, F[R]]

Attributes

Source
EntityEncoder.scala

Attributes

Source
EntityEncoder.scala
implicit def streamEncoder[F[_], A](implicit W: EntityEncoder[F, A]): EntityEncoder[F, Stream[F, A]]

A stream encoder is intended for streaming, and does not calculate its bodies in advance.

A stream encoder is intended for streaming, and does not calculate its bodies in advance. As such, it does not calculate the Content-Length in advance. This is for use with chunked transfer encoding.

Attributes

Source
EntityEncoder.scala
implicit def stringEncoder(implicit charset: Charset): Pure[String]

Attributes

Source
EntityEncoder.scala
implicit val unitEncoder: Pure[Unit]

Attributes

Source
EntityEncoder.scala