Package-level declarations

The HTTP layer. Implement io.github.rohang27.thesportsdb.http.HttpTransport to use another HTTP stack.

Types

Link copied to clipboard
class HttpResponse(val status: Int, val body: String, val headers: Map<String, String> = emptyMap())

A plain HTTP response: what the library needs from a transport.

Link copied to clipboard
fun interface HttpTransport

Performs GET requests. The default is OkHttpTransport; supply your own to plug in another HTTP stack or to fake the network in tests.

Link copied to clipboard
class OkHttpTransport(client: OkHttpClient = OkHttpClient()) : HttpTransport

HttpTransport backed by OkHttp. Share one OkHttpClient across your app when you can.