Skip navigation links
A B C D E G H I M N O P Q R S T U V W 

A

addHeader(String) - Method in class okhttp3.mockwebserver.MockResponse
Adds header as an HTTP header.
addHeader(String, Object) - Method in class okhttp3.mockwebserver.MockResponse
Adds a new header with the name and value.
addHeaderLenient(String, Object) - Method in class okhttp3.mockwebserver.MockResponse
Adds a new header with the name and value.
after() - Method in class okhttp3.mockwebserver.MockWebServer
 
awaitSuccess() - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
Returns once the duplex conversation completes successfully.

B

before() - Method in class okhttp3.mockwebserver.MockWebServer
 

C

clearHeaders() - Method in class okhttp3.mockwebserver.MockResponse
Removes all HTTP headers including any "Content-Length" and "Transfer-encoding" headers that were added by default.
clone() - Method in class okhttp3.mockwebserver.MockResponse
 
close() - Method in class okhttp3.mockwebserver.MockWebServer
 

D

dispatch(RecordedRequest) - Method in class okhttp3.mockwebserver.Dispatcher
Returns a response to satisfy request.
dispatch(RecordedRequest) - Method in class okhttp3.mockwebserver.QueueDispatcher
 
Dispatcher - Class in okhttp3.mockwebserver
Handler for mock server requests.
Dispatcher() - Constructor for class okhttp3.mockwebserver.Dispatcher
 
DuplexResponseBody - Interface in okhttp3.mockwebserver.internal.duplex
 

E

enqueue(MockResponse) - Method in class okhttp3.mockwebserver.MockWebServer
Scripts response to be returned to a request made in sequence.
enqueueResponse(MockResponse) - Method in class okhttp3.mockwebserver.QueueDispatcher
 
exhaustRequest() - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
exhaustResponse() - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 

G

getBody() - Method in class okhttp3.mockwebserver.MockResponse
Returns a copy of the raw HTTP payload.
getBody() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the body of this POST request.
getBodyDelay(TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
 
getBodySize() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the total size of the body of this POST request (before truncation).
getChunkSizes() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the sizes of the chunks of this request's body, or an empty list if the request's body was empty or unchunked.
getDispatcher() - Method in class okhttp3.mockwebserver.MockWebServer
Returns the dispatcher used to respond to HTTP requests.
getHandshake() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the TLS handshake of the connection that carried this request, or null if the request was received without TLS.
getHeader(String) - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the first header named name, or null if no such header exists.
getHeaders() - Method in class okhttp3.mockwebserver.MockResponse
Returns the HTTP headers, such as "Content-Length: 0".
getHeaders() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns all headers.
getHeadersDelay(TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
 
getHostName() - Method in class okhttp3.mockwebserver.MockWebServer
 
getHttp2ErrorCode() - Method in class okhttp3.mockwebserver.MockResponse
 
getMethod() - Method in class okhttp3.mockwebserver.RecordedRequest
 
getPath() - Method in class okhttp3.mockwebserver.RecordedRequest
 
getPort() - Method in class okhttp3.mockwebserver.MockWebServer
 
getPushPromises() - Method in class okhttp3.mockwebserver.MockResponse
Returns the streams the server will push with this response.
getRequestCount() - Method in class okhttp3.mockwebserver.MockWebServer
Returns the number of HTTP requests received thus far by this server.
getRequestLine() - Method in class okhttp3.mockwebserver.RecordedRequest
 
getRequestUrl() - Method in class okhttp3.mockwebserver.RecordedRequest
 
getSequenceNumber() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the index of this request on its HTTP connection.
getSettings() - Method in class okhttp3.mockwebserver.MockResponse
 
getSocketPolicy() - Method in class okhttp3.mockwebserver.MockResponse
 
getStatus() - Method in class okhttp3.mockwebserver.MockResponse
Returns the HTTP response line, such as "HTTP/1.1 200 OK".
getThrottleBytesPerPeriod() - Method in class okhttp3.mockwebserver.MockResponse
 
getThrottlePeriod(TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
 
getTlsVersion() - Method in class okhttp3.mockwebserver.RecordedRequest
Returns the connection's TLS version or null if the connection doesn't use SSL.
getTrailers() - Method in class okhttp3.mockwebserver.MockResponse
 
getUtf8Body() - Method in class okhttp3.mockwebserver.RecordedRequest
Deprecated.
getWebSocketListener() - Method in class okhttp3.mockwebserver.MockResponse
 

H

headers() - Method in class okhttp3.mockwebserver.PushPromise
 

I

instance - Static variable in class okhttp3.internal.duplex.MwsDuplexAccess
 

M

method() - Method in class okhttp3.mockwebserver.PushPromise
 
MockDuplexResponseBody - Class in okhttp3.mockwebserver.internal.duplex
A scriptable request/response conversation.
MockDuplexResponseBody() - Constructor for class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
MockResponse - Class in okhttp3.mockwebserver
A scripted response to be replayed by the mock web server.
MockResponse() - Constructor for class okhttp3.mockwebserver.MockResponse
Creates a new mock response with an empty body.
MockWebServer - Class in okhttp3.mockwebserver
A scriptable web server.
MockWebServer() - Constructor for class okhttp3.mockwebserver.MockWebServer
 
MwsDuplexAccess - Class in okhttp3.internal.duplex
Internal access to MockWebServer APIs.
MwsDuplexAccess() - Constructor for class okhttp3.internal.duplex.MwsDuplexAccess
 

N

noClientAuth() - Method in class okhttp3.mockwebserver.MockWebServer
Configure the server to not perform SSL authentication of the client.

O

okhttp3.internal.duplex - package okhttp3.internal.duplex
 
okhttp3.mockwebserver - package okhttp3.mockwebserver
 
okhttp3.mockwebserver.internal.duplex - package okhttp3.mockwebserver.internal.duplex
 
onRequest(RecordedRequest, BufferedSource, BufferedSink) - Method in interface okhttp3.mockwebserver.internal.duplex.DuplexResponseBody
 
onRequest(RecordedRequest, BufferedSource, BufferedSink) - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 

P

path() - Method in class okhttp3.mockwebserver.PushPromise
 
peek() - Method in class okhttp3.mockwebserver.Dispatcher
Returns an early guess of the next response, used for policy on how an incoming request should be received.
peek() - Method in class okhttp3.mockwebserver.QueueDispatcher
 
protocols() - Method in class okhttp3.mockwebserver.MockWebServer
 
PushPromise - Class in okhttp3.mockwebserver
An HTTP request initiated by the server.
PushPromise(String, String, Headers, MockResponse) - Constructor for class okhttp3.mockwebserver.PushPromise
 

Q

QueueDispatcher - Class in okhttp3.mockwebserver
Default dispatcher that processes a script of responses.
QueueDispatcher() - Constructor for class okhttp3.mockwebserver.QueueDispatcher
 

R

receiveRequest(String) - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
RecordedRequest - Class in okhttp3.mockwebserver
An HTTP request that came into the mock web server.
RecordedRequest(String, Headers, List<Integer>, long, Buffer, int, Socket) - Constructor for class okhttp3.mockwebserver.RecordedRequest
 
removeHeader(String) - Method in class okhttp3.mockwebserver.MockResponse
Removes all headers named name.
requestClientAuth() - Method in class okhttp3.mockwebserver.MockWebServer
Configure the server to want client auth.
requestIOException() - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
requireClientAuth() - Method in class okhttp3.mockwebserver.MockWebServer
Configure the server to need client auth.
response() - Method in class okhttp3.mockwebserver.PushPromise
 
responseQueue - Variable in class okhttp3.mockwebserver.QueueDispatcher
 

S

sendResponse(String) - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
setBody(MockResponse, DuplexResponseBody) - Method in class okhttp3.internal.duplex.MwsDuplexAccess
 
setBody(Buffer) - Method in class okhttp3.mockwebserver.MockResponse
 
setBody(String) - Method in class okhttp3.mockwebserver.MockResponse
Sets the response body to the UTF-8 encoded bytes of body.
setBodyDelay(long, TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
Set the delayed time of the response body to delay.
setBodyLimit(long) - Method in class okhttp3.mockwebserver.MockWebServer
Sets the number of bytes of the POST body to keep in memory to the given limit.
setChunkedBody(Buffer, int) - Method in class okhttp3.mockwebserver.MockResponse
Sets the response body to body, chunked every maxChunkSize bytes.
setChunkedBody(String, int) - Method in class okhttp3.mockwebserver.MockResponse
Sets the response body to the UTF-8 encoded bytes of body, chunked every maxChunkSize bytes.
setDispatcher(Dispatcher) - Method in class okhttp3.mockwebserver.MockWebServer
Sets the dispatcher used to match incoming requests to mock responses.
setFailFast(boolean) - Method in class okhttp3.mockwebserver.QueueDispatcher
 
setFailFast(MockResponse) - Method in class okhttp3.mockwebserver.QueueDispatcher
 
setHeader(String, Object) - Method in class okhttp3.mockwebserver.MockResponse
Removes all headers named name, then adds a new header with the name and value.
setHeaders(Headers) - Method in class okhttp3.mockwebserver.MockResponse
Replaces all headers with those specified.
setHeadersDelay(long, TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
 
setHttp2ErrorCode(int) - Method in class okhttp3.mockwebserver.MockResponse
Sets the HTTP/2 error code to be returned when resetting the stream.
setProtocolNegotiationEnabled(boolean) - Method in class okhttp3.mockwebserver.MockWebServer
Sets whether ALPN is used on incoming HTTPS connections to negotiate a protocol like HTTP/1.1 or HTTP/2.
setProtocols(List<Protocol>) - Method in class okhttp3.mockwebserver.MockWebServer
Indicates the protocols supported by ALPN on incoming HTTPS connections.
setResponseCode(int) - Method in class okhttp3.mockwebserver.MockResponse
 
setServerSocketFactory(ServerSocketFactory) - Method in class okhttp3.mockwebserver.MockWebServer
 
setSocketPolicy(SocketPolicy) - Method in class okhttp3.mockwebserver.MockResponse
 
setStatus(String) - Method in class okhttp3.mockwebserver.MockResponse
 
setTrailers(Headers) - Method in class okhttp3.mockwebserver.MockResponse
Replaces all trailers with those specified.
shutdown() - Method in class okhttp3.mockwebserver.Dispatcher
Release any resources held by this dispatcher.
shutdown() - Method in class okhttp3.mockwebserver.MockWebServer
 
shutdown() - Method in class okhttp3.mockwebserver.QueueDispatcher
 
sleep(long, TimeUnit) - Method in class okhttp3.mockwebserver.internal.duplex.MockDuplexResponseBody
 
SocketPolicy - Enum in okhttp3.mockwebserver
What should be done with the incoming socket.
start() - Method in class okhttp3.mockwebserver.MockWebServer
Equivalent to start(0).
start(int) - Method in class okhttp3.mockwebserver.MockWebServer
Starts the server on the loopback interface for the given port.
start(InetAddress, int) - Method in class okhttp3.mockwebserver.MockWebServer
Starts the server on the given address and port.

T

takeRequest() - Method in class okhttp3.mockwebserver.MockWebServer
Awaits the next HTTP request, removes it, and returns it.
takeRequest(long, TimeUnit) - Method in class okhttp3.mockwebserver.MockWebServer
Awaits the next HTTP request (waiting up to the specified wait time if necessary), removes it, and returns it.
throttleBody(long, long, TimeUnit) - Method in class okhttp3.mockwebserver.MockResponse
Throttles the request reader and response writer to sleep for the given period after each series of bytesPerPeriod bytes are transferred.
toProxyAddress() - Method in class okhttp3.mockwebserver.MockWebServer
 
toString() - Method in class okhttp3.mockwebserver.MockResponse
 
toString() - Method in class okhttp3.mockwebserver.MockWebServer
 
toString() - Method in class okhttp3.mockwebserver.RecordedRequest
 

U

url(String) - Method in class okhttp3.mockwebserver.MockWebServer
Returns a URL for connecting to this server.
useHttps(SSLSocketFactory, boolean) - Method in class okhttp3.mockwebserver.MockWebServer
Serve requests with HTTPS rather than otherwise.

V

valueOf(String) - Static method in enum okhttp3.mockwebserver.SocketPolicy
Returns the enum constant of this type with the specified name.
values() - Static method in enum okhttp3.mockwebserver.SocketPolicy
Returns an array containing the constants of this enum type, in the order they are declared.

W

withPush(PushPromise) - Method in class okhttp3.mockwebserver.MockResponse
When protocols include Protocol.HTTP_2, this attaches a pushed stream to this response.
withSettings(Settings) - Method in class okhttp3.mockwebserver.MockResponse
When protocols include HTTP/2, this pushes settings before writing the response.
withWebSocketUpgrade(WebSocketListener) - Method in class okhttp3.mockwebserver.MockResponse
Attempts to perform a web socket upgrade on the connection.
A B C D E G H I M N O P Q R S T U V W 
Skip navigation links

Copyright © 2019. All rights reserved.