Skip to content

Instantly share code, notes, and snippets.

@Rohit-554
Last active September 10, 2023 10:16
Show Gist options
  • Select an option

  • Save Rohit-554/4d9482577e984ab4d53f08d9b40595db to your computer and use it in GitHub Desktop.

Select an option

Save Rohit-554/4d9482577e984ab4d53f08d9b40595db to your computer and use it in GitHub Desktop.
...
@Singleton
@Provides
fun provideXmlExampleApiService(): XmlExampleApiService {
return Retrofit.Builder()
.baseUrl(ApiConstants.Base_Url)
.client(OkHttpClientHelper().getOkHttpClient())
//note the converter factory
.addConverterFactory(SimpleXmlConverterFactory.create())
.build()
.create(XmlExampleApiService::class.java)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment