KtorRestClient

class KtorRestClient(    nodes: Node = arrayOf( Node( "localhost", 9200 ) ),     https: Boolean = false,     user: String? = null,     password: String? = null,     logging: Boolean = false,     nodeSelector: NodeSelector = RoundRobinNodeSelector(nodes),     elasticApiKey: String? = null,     client: HttpClient = defaultKtorHttpClient( logging = logging, user = user, password = password, elasticApiKey = elasticApiKey ) { defaultInit(logging, user, password, elasticApiKey) }) : RestClient, Closeable

Ktor-client implementation of the RestClient.

Constructors

Link copied to clipboard
constructor(    host: String = "localhost",     port: Int = 9200,     https: Boolean = false,     user: String? = null,     password: String? = null,     logging: Boolean = false,     elasticApiKey: String? = null,     client: HttpClient = defaultKtorHttpClient( logging = logging, user = user, password = password, elasticApiKey = elasticApiKey ) { defaultInit(logging, user, password, elasticApiKey) })
constructor(    vararg nodes: Node = arrayOf( Node( "localhost", 9200 ) ),     https: Boolean = false,     user: String? = null,     password: String? = null,     logging: Boolean = false,     nodeSelector: NodeSelector = RoundRobinNodeSelector(nodes),     elasticApiKey: String? = null,     client: HttpClient = defaultKtorHttpClient( logging = logging, user = user, password = password, elasticApiKey = elasticApiKey ) { defaultInit(logging, user, password, elasticApiKey) })

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
Link copied to clipboard
open suspend override fun doRequest(    pathComponents: List<String>,     httpMethod: HttpMethod,     parameters: Map<String, Any>?,     payload: String?,     contentType: String,     headers: Map<String, Any>?): RestResponse
Link copied to clipboard
Link copied to clipboard
suspend fun RestClient.head(block: SearchAPIRequest.() -> Unit): RestResponse
Link copied to clipboard
open suspend override fun nextNode(): Node
Link copied to clipboard
Link copied to clipboard