toggle menu
okhttp-parent
5.0.0-SNAPSHOT
jvm
switch theme
search in API
mockwebserver
/
okhttp3.mockwebserver
/
MockWebServer
Mock
Web
Server
class
MockWebServer
:
ExternalResource
,
Closeable
Members
Constructors
Mock
Web
Server
Link copied to clipboard
constructor
(
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
body
Limit
Link copied to clipboard
var
bodyLimit
:
Long
delegate
Link copied to clipboard
@
ExperimentalOkHttpApi
val
delegate
:
MockWebServer
dispatcher
Link copied to clipboard
var
dispatcher
:
Dispatcher
host
Name
Link copied to clipboard
val
hostName
:
String
port
Link copied to clipboard
val
port
:
Int
protocol
Negotiation
Enabled
Link copied to clipboard
var
protocolNegotiationEnabled
:
Boolean
protocols
Link copied to clipboard
@get:
JvmName
(
name
=
"protocols"
)
var
protocols
:
List
<
Protocol
>
request
Count
Link copied to clipboard
val
requestCount
:
Int
server
Socket
Factory
Link copied to clipboard
var
serverSocketFactory
:
ServerSocketFactory
?
Functions
apply
Link copied to clipboard
open
override
fun
apply
(
p0
:
Statement
,
p1
:
Description
)
:
Statement
close
Link copied to clipboard
open
override
fun
close
(
)
enqueue
Link copied to clipboard
fun
enqueue
(
response
:
MockResponse
)
no
Client
Auth
Link copied to clipboard
fun
noClientAuth
(
)
request
Client
Auth
Link copied to clipboard
fun
requestClientAuth
(
)
require
Client
Auth
Link copied to clipboard
fun
requireClientAuth
(
)
shutdown
Link copied to clipboard
@
Synchronized
fun
shutdown
(
)
start
Link copied to clipboard
@
JvmOverloads
fun
start
(
port
:
Int
=
0
)
fun
start
(
inetAddress
:
InetAddress
,
port
:
Int
)
take
Request
Link copied to clipboard
fun
takeRequest
(
)
:
RecordedRequest
fun
takeRequest
(
timeout
:
Long
,
unit
:
TimeUnit
)
:
RecordedRequest
?
to
Proxy
Address
Link copied to clipboard
fun
toProxyAddress
(
)
:
Proxy
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
url
Link copied to clipboard
fun
url
(
path
:
String
)
:
HttpUrl
use
Https
Link copied to clipboard
fun
useHttps
(
sslSocketFactory
:
SSLSocketFactory
,
tunnelProxy
:
Boolean
)