Skip to content

Add common interface for network requests #13

@EdricChan03

Description

@EdricChan03

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:

interface HttpClient {
  suspend fun <T> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    designAPI designlib:api-commonIssues regarding the common libraryquestionFurther information is requested

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions