mockwebserver / okhttp3.mockwebserver / MockWebServer / setDispatcher

setDispatcher

fun setDispatcher(dispatcher: Dispatcher!): Unit

Sets the dispatcher used to match incoming requests to mock responses. The default dispatcher simply serves a fixed sequence of responses from a queue; custom dispatchers can vary the response based on timing or the content of the request.