Last active
August 6, 2020 14:48
-
-
Save weverb2/5b880737d3022b305a8692c1939be2ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object NetworkConfiguration { | |
const val BASE_URL = "https://jsonplaceholder.typicode.com/" | |
val retrofit = Retrofit.Builder() | |
.addConverterFactory(MoshiConverterFactory.create()) | |
.client(OkHttpClient()) | |
.baseUrl(BASE_URL) | |
.build() | |
fun getPlaceholderApi(): PlaceholderApi { | |
return retrofit.create(PlaceholderApi::class.java) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment