Hi colleagues, may be I am missing something essen...
# ktor
a
Hi colleagues, may be I am missing something essential: if I have a multiplatform (lib) project using ktor, am I supposed to configure different Http Clients for each platform? What is a recommended approach here - obviously the library code should not know about which client implementation is used. Should I create it using per-platform function? Somehow I expect this to be basis thing but could not find answer in official ktor/mpp docs.
e
Hey! You can use
val client = HttpClient()
in common and it will automatically select implementation for every platform, using dependencies
g
And if you need platform specific additions, you can
expect
a function in the commonSrc and provide an
actual
implementation in each platform specific code.
👍 1
a
Thank you. Was no aware about automatic implementation so far. Will try this first!