OkHttpEngine

class OkHttpEngine(client: OkHttpClient = defaultClient()) : HttpEngine

Default HttpEngine, backed by OkHttp.

Constructors

Link copied to clipboard
constructor(client: OkHttpClient = defaultClient())

Types

Link copied to clipboard
object Companion

Factories for the default client.

Functions

Link copied to clipboard
open suspend override fun delete(url: String, headers: Map<String, String>): HttpResponse

DELETE via OkHttp, on the IO dispatcher since the call blocks.

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

GET via OkHttp, on the IO dispatcher since the call blocks.

Link copied to clipboard
open suspend override fun post(url: String, body: String, headers: Map<String, String>): HttpResponse

POST via OkHttp, on the IO dispatcher since the call blocks.

Link copied to clipboard
open suspend override fun put(url: String, body: ByteArray, contentType: String, headers: Map<String, String>): HttpResponse

PUT raw bytes via OkHttp, on the IO dispatcher since the call blocks.