Body

io.eezo.http.Body
enum Body

A response body.

Stream is deliberately absent and reserved: Html.renderTo already writes into a builder, so the case can arrive without reshaping anything here.

Attributes

Source
Response.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Bytes(value: Array[Byte])

Bytes, already encoded. What anything that is not a page comes back as.

Bytes, already encoded. What anything that is not a page comes back as.

Attributes

Source
Response.scala
case Empty extends Body

Attributes

Source
Response.scala
final case class Html(value: Html)

Attributes

Source
Response.scala
final case class Json(text: String)

JSON, already serialized. A case of its own rather than Bytes with a header beside it, because what a body is decides how it goes out: the server encodes it as UTF-8, the only encoding RFC 8259 allows between systems, and names it JSON unless the response already names a type of its own, and nothing that frames a page reaches into it. Text rather than a value, because eezo serializes nothing an application owns: the serializer is the application's.

JSON, already serialized. A case of its own rather than Bytes with a header beside it, because what a body is decides how it goes out: the server encodes it as UTF-8, the only encoding RFC 8259 allows between systems, and names it JSON unless the response already names a type of its own, and nothing that frames a page reaches into it. Text rather than a value, because eezo serializes nothing an application owns: the serializer is the application's.

Attributes

Source
Response.scala