Made webClient settable

This commit is contained in:
dankito 2020-07-15 22:01:29 +02:00
parent 5d12fd8f7f
commit a9b8848379
1 changed files with 7 additions and 2 deletions

View File

@ -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)
}
}