Skip to content

Instantly share code, notes, and snippets.

@hiteshchopra11
Created January 16, 2022 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiteshchopra11/ef911c608e5d7ab0334222e9e61e2926 to your computer and use it in GitHub Desktop.
Save hiteshchopra11/ef911c608e5d7ab0334222e9e61e2926 to your computer and use it in GitHub Desktop.
interface ImageService {
suspend fun getImages(): ImageResponse
companion object {
@ExperimentalSerializationApi fun create(): ImageService {
return ImageServiceImpl(
client = HttpClient(Android) {
install(Logging)
install(JsonFeature) {
serializer = GsonSerializer()
}
}
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment