From a9b8848379739b9308d4e4ffe61024ebbe6e2835 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 15 Jul 2020 22:01:29 +0200 Subject: [PATCH] Made webClient settable --- .../net/dankito/banking/fints4kBankingClientCreator.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/fints4kBankingClientCreator.kt b/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/fints4kBankingClientCreator.kt index e4f8c3de..799c0707 100644 --- a/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/fints4kBankingClientCreator.kt +++ b/ui/fints4kBankingClient/src/commonMain/kotlin/net/dankito/banking/fints4kBankingClientCreator.kt @@ -4,12 +4,17 @@ import net.dankito.banking.ui.BankingClientCallback import net.dankito.banking.ui.IBankingClient import net.dankito.banking.ui.IBankingClientCreator import net.dankito.banking.bankfinder.BankInfo +import net.dankito.banking.fints.webclient.IWebClient +import net.dankito.banking.fints.webclient.KtorWebClient import net.dankito.banking.util.IAsyncRunner import net.dankito.banking.util.ISerializer import net.dankito.utils.multiplatform.File -open class fints4kBankingClientCreator(protected val serializer: ISerializer) : IBankingClientCreator { +open class fints4kBankingClientCreator( + protected val serializer: ISerializer, + protected val webClient: IWebClient = KtorWebClient() +) : IBankingClientCreator { override fun createClient( bankInfo: BankInfo, @@ -20,7 +25,7 @@ open class fints4kBankingClientCreator(protected val serializer: ISerializer) : callback: BankingClientCallback ): IBankingClient { - return fints4kBankingClient(bankInfo, customerId, pin, dataFolder, serializer, callback = callback) + return fints4kBankingClient(bankInfo, customerId, pin, dataFolder, serializer, webClient, callback = callback) } } \ No newline at end of file