Package com.apollographql.apollo3.mockserver
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class MockResponse @ApolloDeprecatedSince(version = ApolloDeprecatedSince.Version.v3_3_1) constructor( val statusCode: Int = 200, val body: Flow<ByteString> = emptyFlow(), val headers: Map<String, String> = mapOf("Content-Length" to "0"), val delayMillis: Long = 0)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class Socket( socketFd: Int, acceptDelayMillis: Long, mockServerHandler: MockServerHandler)
Content copied to clipboard
Functions
Link copied to clipboard
Turns a FlowTransfer-Encoding: chunked
compatible one.
Link copied to clipboard
fun createMultipartMixedChunkedResponse( parts: List<String>, statusCode: Int = 200, partsContentType: String = "application/json; charset=utf-8", headers: Map<String, String> = emptyMap(), responseDelayMillis: Long = 0, chunksDelayMillis: Long = 0, boundary: String = "-"): MockResponse
Content copied to clipboard
Link copied to clipboard
fun MockServer.enqueue( string: String = "", delayMs: Long = 0, statusCode: Int = 200)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Read a source encoded in the "Transfer-Encoding: chunked" encoding. This format is a sequence of:
Link copied to clipboard
suspend fun writeResponse( sink: BufferedSink, mockResponse: MockResponse, version: String)
Content copied to clipboard