Ktorfit
Ktorfit copied to clipboard
Document how to use custom Ktor client
The docs mention
Ktorfit doesn’t parse JSON. You have to install the Json Feature to the Ktor Client that you add to Ktorfit
but never explain how to use your own Ktor client.
@mattrob33 Just provide your own client in the constructor
Ktorfit(baseUrl = "url", httpClient = HttpClient {
install(ContentNegotiation) {
json(Json {
prettyPrint = true
isLenient = true
ignoreUnknownKeys = true
})
}
})
Sorry, for the very late reaction. I finally added it to the documentation https://foso.github.io/Ktorfit/configuration/#add-your-own-ktor-client