EventSource
class EventSource(requestSupplier: suspend (Headers) -> Request, retryTime: Duration = retryTimeDefault, eventTimeout: Duration? = eventTimeoutDefault, eventTimeoutCheckInterval: Duration = eventTimeoutCheckIntervalDefault, logger: Logger = LoggerFactory.getLogger(EventSource::class.java)) : Closeable
Server-Sent Events stream client.
EventSource is built on Sunday requests and allows customizing the requests for scenarios like authentication and custom headers.
Constructors
Types
Functions
Link copied to clipboard
Add an event listener for a specific event type.
Link copied to clipboard
Close and disconnect the EventSource.
Link copied to clipboard
Connect the EventSource.
Link copied to clipboard
Removed a previously added event listener.