ServerSentEvent

zio.http.ServerSentEvent
See theServerSentEvent companion object
final case class ServerSentEvent[T](data: T, eventType: Option[String] = ..., id: Option[String] = ..., retry: Option[Duration] = ...)

Value parameters

data

data, may span multiple lines

eventType

optional type, must not contain \n or \r

id

optional id, must not contain \n or \r

retry

optional reconnection delay

Attributes

Companion
object
Source
ServerSentEvent.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def encode(implicit binaryCodec: BinaryCodec[T]): String

Attributes

Source
ServerSentEvent.scala
def encodeWith(f: T => String): String

Attributes

Source
ServerSentEvent.scala
def encoded(implicit ev: T <:< String): String

Attributes

Source
ServerSentEvent.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product