ServerSentEvent

zio.http.ServerSentEvent
See theServerSentEvent companion class

Attributes

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

Members list

Value members

Concrete methods

def apply[A](data: A): ServerSentEvent[A]

Creates a new Server-Sent Event without an explicit event field.

Creates a new Server-Sent Event without an explicit event field.

Attributes

Source
ServerSentEvent.scala
def apply[A](data: A, event: String): ServerSentEvent[A]

Creates a new Server-Sent Event with an explicit event field.

Creates a new Server-Sent Event with an explicit event field.

Attributes

Source
ServerSentEvent.scala
def fromOptions[A](data: A, event: Option[String] = ..., id: Option[String] = ..., retry: Option[Long] = ...): ServerSentEvent[A]

Creates a new Server-Sent Event from optional metadata fields.

Creates a new Server-Sent Event from optional metadata fields.

Attributes

Source
ServerSentEvent.scala