AuthenticatedWebSocketClient

internal class AuthenticatedWebSocketClient(engine: HttpClientEngine, bearerAuthProvider: BearerAuthProvider, serverConfigDTO: ServerConfigDTO, kaliumLogger: KaliumLogger, webSocketSessionProvider: (HttpClient, String) -> WebSocketSession? = null)

HttpClient with WebSocket (ws or wss) capabilities. It's Authenticated, and will use the provided SessionManager to fill necessary Authentication headers, and refresh tokens as they expire.

Constructors

Link copied to clipboard
constructor(engine: HttpClientEngine, bearerAuthProvider: BearerAuthProvider, serverConfigDTO: ServerConfigDTO, kaliumLogger: KaliumLogger, webSocketSessionProvider: (HttpClient, String) -> WebSocketSession? = null)

Functions

Link copied to clipboard
suspend fun createWebSocketSession(clientId: String, block: HttpRequestBuilder.() -> Unit): WebSocketSession
Link copied to clipboard
fun createWSSUrl(shouldAddApiVersion: Boolean = false, vararg path: String): Url

Creates a Url for the WebSocket connection with the ability to be versioned.