Skip to content

Instantly share code, notes, and snippets.

@imrankst1221
Created November 4, 2018 09:31
Show Gist options
  • Save imrankst1221/67a92073b2d804ba399a185c9debc404 to your computer and use it in GitHub Desktop.
Save imrankst1221/67a92073b2d804ba399a185c9debc404 to your computer and use it in GitHub Desktop.
Retrofit Client Builder
object ApiService {
private val TAG = "--ApiService"
fun loginApiCall() = Retrofit.Builder()
.baseUrl(Constants.API_BASE_PATH)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(ApiWorker.gsonConverter)
.client(ApiWorker.client)
.build()
.create(LoginApiService::class.java)!!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment