//mockwebserver/okhttp3.mockwebserver/MockWebServer
MockWebServer¶
[jvm]\ class MockWebServer : ExternalResource, Closeable
Constructors¶
MockWebServer | [jvm] fun MockWebServer() |
Types¶
Name | Summary |
---|---|
Companion | [jvm] object Companion |
Functions¶
Name | Summary |
---|---|
apply | [jvm] open override fun apply(p0: Statement, p1: Description): Statement |
close | [jvm] open override fun close() |
enqueue | [jvm] fun enqueue(response: MockResponse) |
noClientAuth | [jvm] fun noClientAuth() |
requestClientAuth | [jvm] fun requestClientAuth() |
requireClientAuth | [jvm] fun requireClientAuth() |
shutdown | [jvm] @Synchronized fun shutdown() |
start | [jvm] @JvmOverloads fun start(port: Int = 0) fun start(inetAddress: InetAddress, port: Int) |
takeRequest | [jvm] fun takeRequest(): RecordedRequest fun takeRequest(timeout: Long, unit: TimeUnit): RecordedRequest? |
toProxyAddress | [jvm] fun toProxyAddress(): Proxy |
toString | [jvm] open override fun toString(): String |
url | [jvm] fun url(path: String): HttpUrl |
useHttps | [jvm] fun useHttps(sslSocketFactory: SSLSocketFactory, tunnelProxy: Boolean) |
Properties¶
Name | Summary |
---|---|
bodyLimit | [jvm] var bodyLimit: Long |
delegate | [jvm] val delegate: MockWebServer |
dispatcher | [jvm] var dispatcher: Dispatcher |
hostName | [jvm] val hostName: String |
port | [jvm] val port: Int |
protocolNegotiationEnabled | [jvm] var protocolNegotiationEnabled: Boolean |
protocols | [jvm] @get:JvmName(name = "protocols") var protocols: List<Protocol> |
requestCount | [jvm] val requestCount: Int |
serverSocketFactory | [jvm] var serverSocketFactory: ServerSocketFactory? |