v2026.6.4
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.

SSEStream

Server-Sent Events (SSE) stream reader. Reads events from an HTTP text/event-stream response line by line.

Example

client := HttpsClient->New();
client->AddHeader("Authorization", "Bearer ...");
stream := client->StreamPost(url, body, "application/json");
if(stream <> Nil) {
  while(stream->HasNext()) {
    event := stream->Next();
    event->GetData()->PrintLine();
  };
  stream->Close();
};

Operations

Close #

Closes the underlying connection

method : public : Close() ~ Nil

GetStatusCode #

Gets the HTTP status code

method : public : GetStatusCode() ~ Int

Return

TypeDescription
Intstatus code

HasNext #

Checks if more events are available

method : public : HasNext() ~ Bool

Return

TypeDescription
Booltrue if another event can be read

Next #

Returns the next SSE event. Call HasNext() first.

method : public : Next() ~ SSEEvent

Return

TypeDescription
SSEEventnext event