summon an implicit EntityEncoder
Create a new EntityEncoder
Create a new EntityEncoder
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.
Encodes a value from its Show instance.
Encodes a value from its Show instance. Too broad to be implicit, too useful to not exist.
Create a new EntityEncoder
Create a new EntityEncoder
This constructor is a helper for types that can be serialized synchronously, for example a String.
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.
(Since version 0.18.5) This encoder breaks referential transparency and can cause unintended evaluation of expressions if you're not careful. See: https://github.com/http4s/http4s/issues/1757, which means you can potentially evaluate futures eagerly. You could end up executing a statement you don't intend to despite it not returning to you as a value.
If you _must_ use futures, use something such as IO.fromFuture(IO(myFuture))
or define your
own helper that does not evaluate the future eagerly, as otherwise it will evaluate the moment it's bound.