Package-level declarations

Types

Link copied to clipboard
abstract class Dispatcher : Closeable

Handler for mock server requests.

Link copied to clipboard

A scripted response to be replayed by the mock web server.

Link copied to clipboard

The body of a MockResponse.

Link copied to clipboard

A scriptable web server. Callers supply canned responses and the server replays them upon request in sequence.

Link copied to clipboard
class PushPromise(val method: String, val path: String, val headers: Headers, val response: MockResponse)

An HTTP request initiated by the server.

Link copied to clipboard

Default dispatcher that processes a script of responses. Populate the script by calling enqueue.

Link copied to clipboard
class RecordedRequest(val connectionIndex: Int, val exchangeIndex: Int, val handshake: Handshake?, val handshakeServerNames: List<String>, val method: String, val target: String, val version: String, val url: HttpUrl, val headers: Headers, val body: ByteString?, val bodySize: Long, val chunkSizes: List<Int>?, val failure: IOException? = null)

An HTTP request that came into the mock web server.

Link copied to clipboard
sealed interface SocketEffect

An adverse action to take on a socket, intended to exercise failure modes in the calling code.

Link copied to clipboard
interface SocketHandler

Handles a call's request and response streams directly. Use this instead of MockResponseBody to begin sending response data before all request data has been received.