Created
December 5, 2018 04:03
-
-
Save furkanaskin/cd1011ac612e0816e71b3ce5ed883d98 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 RetrofitFactory { | |
const val BASE_URL = "https://jsonplaceholder.typicode.com/" | |
fun makeRetrofitService(): RetrofitService { | |
return Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.addCallAdapterFactory(CoroutineCallAdapterFactory()) | |
.build().create(RetrofitService::class.java) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment