SseReader

class SseReader(source: BufferedSource)

Reads ServerSentEvents from an HTTP response body in the text/event-stream format.

Parameters

source

The response body to read from.

Constructors

Link copied to clipboard
constructor(source: BufferedSource)

Properties

Link copied to clipboard

The id of the most recent event that carried an id: field.

Link copied to clipboard

The reconnection interval most recently requested by the server via a retry: field if any.

Functions

Link copied to clipboard

Reads events until the stream ends.