Package io.ktor.client.tests.utils

Types

ClientLoader

abstract expect class ClientLoader

Helper interface to test client.

TestClientBuilder

class TestClientBuilder<T : HttpClientEngineConfig>

TestWithKtor

abstract class TestWithKtor

Extensions for External Classes

kotlin.collections.List

Properties

HTTP_PROXY_SERVER

const val HTTP_PROXY_SERVER: String

TEST_SERVER

const val TEST_SERVER: String

Local test server url.

TEST_WEBSOCKET_SERVER

const val TEST_WEBSOCKET_SERVER: String

Functions

config

fun <T : HttpClientEngineConfig> TestClientBuilder<T>.config(
    block: HttpClientConfig<T>.() -> Unit
): Unit

main

fun main(): Unit

Start server for tests.

makeArray

fun makeArray(size: Int): ByteArray

makeString

fun makeString(size: Int): String

test

fun TestClientBuilder<*>.test(
    block: suspend (client: HttpClient) -> Unit
): Unit

testWithEngine

fun testWithEngine(
    engine: HttpClientEngine,
    block: suspend TestClientBuilder<*>.() -> Unit
): Unit

Perform test with selected client engine.

fun <T : HttpClientEngineConfig> testWithEngine(
    factory: HttpClientEngineFactory<T>,
    block: suspend TestClientBuilder<T>.() -> Unit
): Unit

Perform test with selected client engine factory.