Interface ServerSentEventMessage

Represents a message in the Server-Sent Event (SSE) protocol.

interface ServerSentEventMessage {
    comment?: string;
    data?: string;
    event?: string;
    id?: string | number;
    retry?: number;
}

Properties

comment?: string

Ignored by the client.

data?: string

The data field for the message. Split by new lines.

event?: string

A string identifying the type of event described.

id?: string | number

The event ID to set the EventSource object's last event ID value.

retry?: number

The reconnection time.