EdricChan03 / EdricChan03/Koogle-API

Add common interface for network requests

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
design lib:api-common question
Dominant language
Kotlin
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

We should decide on whether to use a specific network library (e.g. Ktor? OkHttp?), or to add a common interface for end consumers to implement, something like:

```kotlin
interface HttpClient {
suspend fun request(request: NetworkRequest, block: (NetworkResponse) -> T): T
}
```

https://github.com/coil-kt/coil/blob/main/coil-network-core/src/commonMain/kotlin/coil3/network/NetworkClient.kt for an example

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.