- 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
-
- getWebSocketListener() - Method in class okhttp3.mockwebserver.MockResponse
-
- 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
-
- 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.