Package-level declarations

Types

Link copied to clipboard
interface ClientSSESession : CoroutineScope

A client Server-sent events session.

Link copied to clipboard
Link copied to clipboard

Indicates if a client engine supports Server-sent events.

Link copied to clipboard
class SSEClientContent(val reconnectionTime: Duration, val showCommentEvents: Boolean, val showRetryEvents: Boolean) : OutgoingContent.NoContent
Link copied to clipboard
class SSEConfig

A config for the SSE plugin.

Properties

Link copied to clipboard

Client Server-sent events plugin that allows you to establish an SSE connection to a server and receive Server-sent events from it.

Functions

Link copied to clipboard
suspend fun HttpClient.serverSentEvents(request: HttpRequestBuilder.() -> Unit, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: suspend ClientSSESession.() -> Unit)
suspend fun HttpClient.serverSentEvents(urlString: String, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, request: HttpRequestBuilder.() -> Unit = {}, block: suspend ClientSSESession.() -> Unit)
suspend fun HttpClient.serverSentEvents(scheme: String? = null, host: String? = null, port: Int? = null, path: String? = null, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, request: HttpRequestBuilder.() -> Unit = {}, block: suspend ClientSSESession.() -> Unit)

Opens a block with ClientSSESession.

Link copied to clipboard
suspend fun HttpClient.serverSentEventsSession(reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit): ClientSSESession
suspend fun HttpClient.serverSentEventsSession(urlString: String, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit = {}): ClientSSESession
suspend fun HttpClient.serverSentEventsSession(scheme: String? = null, host: String? = null, port: Int? = null, path: String? = null, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit = {}): ClientSSESession
Link copied to clipboard
fun HttpClientConfig<*>.SSE(config: SSEConfig.() -> Unit)

Installs the SSE plugin using the config as configuration.

Link copied to clipboard
suspend fun HttpClient.sse(request: HttpRequestBuilder.() -> Unit, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: suspend ClientSSESession.() -> Unit)
suspend fun HttpClient.sse(urlString: String, request: HttpRequestBuilder.() -> Unit = {}, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: suspend ClientSSESession.() -> Unit)
suspend fun HttpClient.sse(scheme: String? = null, host: String? = null, port: Int? = null, path: String? = null, request: HttpRequestBuilder.() -> Unit = {}, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: suspend ClientSSESession.() -> Unit)

Opens a block with ClientSSESession.

Link copied to clipboard
suspend fun HttpClient.sseSession(reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit): ClientSSESession
suspend fun HttpClient.sseSession(urlString: String, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit = {}): ClientSSESession
suspend fun HttpClient.sseSession(scheme: String? = null, host: String? = null, port: Int? = null, path: String? = null, reconnectionTime: Duration? = null, showCommentEvents: Boolean? = null, showRetryEvents: Boolean? = null, block: HttpRequestBuilder.() -> Unit = {}): ClientSSESession