- generateKeyPair() - Method in class com.squareup.okhttp.internal.SslContextBuilder
-
- getBody() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Returns a copy of the raw HTTP payload.
- getBody() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns the body of this POST request.
- getBodyDelay(TimeUnit) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- getBodySize() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns the total size of the body of this POST request (before
truncation).
- getChunkSizes() - Method in class com.squareup.okhttp.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.
- getCookieDomain() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Returns a cookie domain for this server.
- getHeader(String) - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns the first header named name, or null if no such header exists.
- getHeaders() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Returns the HTTP headers, such as "Content-Length: 0".
- getHeaders() - Method in class com.squareup.okhttp.mockwebserver.PushPromise
-
- getHeaders() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns all headers.
- getHostName() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
- getMethod() - Method in class com.squareup.okhttp.mockwebserver.PushPromise
-
- getMethod() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
- getPath() - Method in class com.squareup.okhttp.mockwebserver.PushPromise
-
- getPath() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
- getPort() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
- getPushPromises() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Returns the streams the server will push with this response.
- getRequestCount() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Returns the number of HTTP requests received thus far by this server.
- getRequestLine() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
- getResponse() - Method in class com.squareup.okhttp.mockwebserver.PushPromise
-
- getSequenceNumber() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns the index of this request on its HTTP connection.
- getSettings() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- getSocketPolicy() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- getStatus() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Returns the HTTP response line, such as "HTTP/1.1 200 OK".
- getThrottleBytesPerPeriod() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- getThrottlePeriod(TimeUnit) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- getTlsVersion() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
Returns the connection's TLS version or null if the connection doesn't use SSL.
- getUrl(String) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Deprecated.
- getUtf8Body() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
-
- getWebSocketListener() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- selfSignedCertificate(KeyPair, String) - Method in class com.squareup.okhttp.internal.SslContextBuilder
-
Generates a certificate for hostName containing keyPair's
public key, signed by keyPair's private key.
- setBody(Buffer) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- setBody(String) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Sets the response body to the UTF-8 encoded bytes of body.
- setBodyDelay(long, TimeUnit) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Set the delayed time of the response body to delay.
- setBodyLimit(long) - Method in class com.squareup.okhttp.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 com.squareup.okhttp.mockwebserver.MockResponse
-
Sets the response body to body, chunked every maxChunkSize
bytes.
- setChunkedBody(String, int) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Sets the response body to the UTF-8 encoded bytes of body, chunked
every maxChunkSize bytes.
- setDispatcher(Dispatcher) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Sets the dispatcher used to match incoming requests to mock responses.
- setFailFast(boolean) - Method in class com.squareup.okhttp.mockwebserver.QueueDispatcher
-
- setFailFast(MockResponse) - Method in class com.squareup.okhttp.mockwebserver.QueueDispatcher
-
- setHeader(String, Object) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Removes all headers named name, then adds a new header with the
name and value.
- setHeaders(Headers) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
Replaces all headers with those specified in headers.
- setProtocolNegotiationEnabled(boolean) - Method in class com.squareup.okhttp.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 com.squareup.okhttp.mockwebserver.MockWebServer
-
Indicates the protocols supported by ALPN on incoming HTTPS
connections.
- setResponseCode(int) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- setServerSocketFactory(ServerSocketFactory) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
- setSocketPolicy(SocketPolicy) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- setStatus(String) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
-
- shutdown() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
- SocketPolicy - Enum in com.squareup.okhttp.mockwebserver
-
What should be done with the incoming socket.
- SslContextBuilder - Class in com.squareup.okhttp.internal
-
Constructs an SSL context for testing.
- SslContextBuilder(String) - Constructor for class com.squareup.okhttp.internal.SslContextBuilder
-
- start() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Equivalent to start(0).
- start(int) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Starts the server on the loopback interface for the given port.
- start(InetAddress, int) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
-
Starts the server on the given address and port.