From 771aed0f0f7e5f5af5edc93ef4eb2b5242750c49 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 4 Mar 2022 15:20:10 +0600 Subject: [PATCH] UnifiedRequester#createStandardWebsocketFlow(String,DeserializationStrategy) --- CHANGELOG.md | 4 ++++ .../micro_utils/ktor/client/StandardHttpClientGetPost.kt | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 925a1618e4f..457bd88e9d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.9.10 +* Ktor: + * Client: + * New function `UnifiedRequester#createStandardWebsocketFlow` without `checkReconnection` arg + ## 0.9.9 * `Versions`: diff --git a/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/StandardHttpClientGetPost.kt b/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/StandardHttpClientGetPost.kt index 0cc8af023aa..dc3d88a235f 100644 --- a/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/StandardHttpClientGetPost.kt +++ b/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/StandardHttpClientGetPost.kt @@ -85,9 +85,14 @@ class UnifiedRequester( fun createStandardWebsocketFlow( url: String, - checkReconnection: (Throwable?) -> Boolean = { true }, + checkReconnection: (Throwable?) -> Boolean, deserializer: DeserializationStrategy ) = client.createStandardWebsocketFlow(url, checkReconnection, deserializer, serialFormat) + + fun createStandardWebsocketFlow( + url: String, + deserializer: DeserializationStrategy + ) = createStandardWebsocketFlow(url, { true }, deserializer) } val defaultRequester = UnifiedRequester()