Hi, folks. I would like to share `Retrofit-style` ...
# multiplatform
h
Hi, folks. I would like to share
Retrofit-style
KMP Network library using Ktor It provides the below - Support Retrofit Annotation : it means that you can use Retrofit interface - Similar function to CallAdapter of Retrofit(Okhttp interceptor is supported by Ktor) for simple migration from Retrofit to this library. just change Retrofit object to HttpClient of Ktor like the below Using Retrofit
Copy code
inline <reified T> fun getApi(baseUrl: String): T {
	return getRetrofit(baseUrl).create(T::class.java)
}
This Library
Copy code
inline <reified T> fun getApi(baseUrl: String): T {
	return getHttpClinet().create(baseUrl)
}
I think this library helps to migrate android+retrofit project to KMP easily. further detail here