v2026.5.3
All Bundles
Bundle Shared networking types used across all HTTP libraries: Url (parsing and construction), Response (status code, headers, body), Cookie, and WebDownloader for streaming downloads. Compile with -lib net.

SSEEvent

Server-Sent Event (SSE) data. Represents a single event from an SSE stream (text/event-stream). Used with LLM APIs (OpenAI, Claude, Gemini) for streaming responses.

Operations

GetData #

Gets the event data (from "data:" field)

method : public : GetData() ~ String

Return

TypeDescription
Stringevent data

GetEvent #

Gets the event type (from "event:" field, or "message" by default)

method : public : GetEvent() ~ String

Return

TypeDescription
Stringevent type

GetId #

Gets the event ID (from "id:" field, may be Nil)

method : public : GetId() ~ String

Return

TypeDescription
Stringevent id

IsDone #

Checks if this is the stream termination signal (data is "[DONE]")

method : public : IsDone() ~ Bool

Return

TypeDescription
Booltrue if done

New # constructor

Constructor

New(event:String, data:String, id:String)

Parameters

NameTypeDescription
eventStringevent type
dataStringevent data
idStringevent id

ToString #

String representation

method : public : ToString() ~ String

Return

TypeDescription
Stringstring