Scoop API

scoop:scoop.http:0.1.0

SseEvent

class SseEvent

source · line 50
public
public class SseEvent internal constructor(
    /**
     * The dispatched event type, defaulting to message.
     */
    public val event: String,
        /**
         * Data lines joined with newline separators.
         */
        public val data: String,
        /**
         * The ID explicitly set in this event, if any.
         */
        public val id: String?,
        /**
         * The persistent last-event ID when this event was dispatched.
         */
        public val lastEventId: String
)

One dispatched server-sent event, including its type, joined data lines, and event-ID state.

property data

source · line 58
public
public val data: String

get: public read-only

Data lines joined with newline separators.

property event

source · line 54
public
public val event: String

get: public read-only

The dispatched event type, defaulting to message.

property id

source · line 62
public
public val id: String?

get: public read-only

The ID explicitly set in this event, if any.

property lastEventId

source · line 66
public
public val lastEventId: String

get: public read-only

The persistent last-event ID when this event was dispatched.