Skip navigation links
A B C D E F G H I K L M 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.
addTrustedCertificate(X509Certificate) - Method in class okhttp3.internal.tls.SslClient.Builder
Add a certificate authority that this client trusts.
apply(Statement, Description) - Method in class okhttp3.mockwebserver.MockWebServer
 

B

build() - Method in class okhttp3.internal.tls.HeldCertificate.Builder
 
build() - Method in class okhttp3.internal.tls.SslClient.Builder
 
Builder() - Constructor for class okhttp3.internal.tls.HeldCertificate.Builder
 
Builder() - Constructor for class okhttp3.internal.tls.SslClient.Builder
 

C

ca(int) - Method in class okhttp3.internal.tls.HeldCertificate.Builder
Set this certificate to be a certificate authority, with up to maxIntermediateCas intermediate certificate authorities beneath it.
certificate - Variable in class okhttp3.internal.tls.HeldCertificate
 
certificateChain(HeldCertificate, HeldCertificate...) - Method in class okhttp3.internal.tls.SslClient.Builder
Configure the certificate chain to use when serving HTTPS responses.
certificateChain(KeyPair, X509Certificate, X509Certificate...) - Method in class okhttp3.internal.tls.SslClient.Builder
 
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
 
commonName(String) - Method in class okhttp3.internal.tls.HeldCertificate.Builder
Set this certificate's name.

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
 

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
 

F

FramedServer - Class in okhttp3.internal.framed
A basic SPDY/HTTP_2 server that serves the contents of a local directory.
FramedServer(File, SSLSocketFactory) - Constructor for class okhttp3.internal.framed.FramedServer
 

G

generateKeyPair() - Method in class okhttp3.internal.tls.HeldCertificate.Builder
 
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.
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.
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
 
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.
getUtf8Body() - Method in class okhttp3.mockwebserver.RecordedRequest
Deprecated.
getWebSocketListener() - Method in class okhttp3.mockwebserver.MockResponse
 

H

headers() - Method in class okhttp3.mockwebserver.PushPromise
 
HeldCertificate - Class in okhttp3.internal.tls
A certificate and its private key.
HeldCertificate(X509Certificate, KeyPair) - Constructor for class okhttp3.internal.tls.HeldCertificate
 
HeldCertificate.Builder - Class in okhttp3.internal.tls
 

I

issuedBy(HeldCertificate) - Method in class okhttp3.internal.tls.HeldCertificate.Builder
Set the certificate that signs this certificate.

K

keyPair(KeyPair) - Method in class okhttp3.internal.tls.HeldCertificate.Builder
 
keyPair - Variable in class okhttp3.internal.tls.HeldCertificate
 
keyStoreType(String) - Method in class okhttp3.internal.tls.SslClient.Builder
 

L

localhost() - Static method in class okhttp3.internal.tls.SslClient
Returns an SSL client for this host's localhost address.

M

main(String...) - Static method in class okhttp3.internal.framed.FramedServer
 
method() - Method in class okhttp3.mockwebserver.PushPromise
 
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
 

O

okhttp3.internal.framed - package okhttp3.internal.framed
 
okhttp3.internal.tls - package okhttp3.internal.tls
 
okhttp3.mockwebserver - package okhttp3.mockwebserver
 
onStream(FramedStream) - Method in class okhttp3.internal.framed.FramedServer
 

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
 
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

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.
response() - Method in class okhttp3.mockwebserver.PushPromise
 
responseQueue - Variable in class okhttp3.mockwebserver.QueueDispatcher
 

S

serialNumber(String) - Method in class okhttp3.internal.tls.HeldCertificate.Builder
 
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 in headers.
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
 
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
 
socketFactory - Variable in class okhttp3.internal.tls.SslClient
 
SocketPolicy - Enum in okhttp3.mockwebserver
What should be done with the incoming socket.
SslClient - Class in okhttp3.internal.tls
Combines an SSL socket factory and trust manager, a pairing enough for OkHttp or MockWebServer to create a secure connection.
SslClient.Builder - Class in okhttp3.internal.tls
 
sslContext - Variable in class okhttp3.internal.tls.SslClient
 
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
 
trustManager - Variable in class okhttp3.internal.tls.SslClient
 

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 F G H I K L M O P Q R S T U V W 
Skip navigation links

Copyright © 2016. All Rights Reserved.