KtorClient

class KtorClient(baseClient: HttpClient, baseRequest: HttpRequestBuilder.() -> Unit) : ClientHandler<KtorClientScope<*>>

A Krosstalk client using a Ktor HttpClient to make requests.

A new client is used for each request, created by calling HttpClient.config on baseClient.

baseRequest is applied to each request before scopes.

Constructors

Link copied to clipboard
fun KtorClient(baseClient: HttpClient = HttpClient(), baseRequest: HttpRequestBuilder.() -> Unit = {})

Functions

Link copied to clipboard
open suspend override fun sendKrosstalkRequest(url: String, httpMethod: String, contentType: String, additionalHeaders: Headers, body: ByteArray?, scopes: List<AppliedClientScope<KtorClientScope<*>, *>>): InternalKrosstalkResponse

Properties

Link copied to clipboard
val baseClient: HttpClient
Link copied to clipboard
val baseRequest: HttpRequestBuilder.() -> Unit

Sources

Link copied to clipboard