MockEngineConfig

class MockEngineConfig : HttpClientEngineConfig

HttpClientEngineConfig for MockEngine.

Constructors

<init>

MockEngineConfig()

HttpClientEngineConfig for MockEngine.

Properties

requestHandlers

val requestHandlers: MutableList<MockRequestHandler>

Request handlers. Responses are given back in order they were added to requestHandlers.

reuseHandlers

var reuseHandlers: Boolean

Should engine reuse handlers.

Inherited Properties

dispatcher

var dispatcher: CoroutineDispatcher?

The CoroutineDispatcher that will be used for the client requests.

pipelining

var pipelining: Boolean

Enable http pipelining advice.

response

val response: HttpResponseConfig

Configuration for http response.

threadsCount

var threadsCount: Int

Network threads count advice.

Functions

addHandler

fun addHandler(handler: MockRequestHandler): Unit

Add request handler to MockEngine