Skip to content

Event

One item of a Server-Sent Events stream.

Yielded by Response.events.

Fields

data @ Str

The payload text. Multiple data: lines are joined with \n.

id @ (Str | nil)

The event identifier, when the stream sends one.

retry @ (Int | nil)

The reconnection delay the stream suggests, when it sends one.

type @ Str

The event type. Defaults to "message" when the stream omits event: or sends an empty one.