Created
January 16, 2022 22:24
-
-
Save hiteshchopra11/ef911c608e5d7ab0334222e9e61e2926 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
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