HttpTransport

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.

Implementations throw IOException for network failures and return any HTTP status (including 4xx and 5xx) as an HttpResponse.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun get(url: HttpUrl, headers: Map<String, String>): HttpResponse