A B C D E G L M P Q R S T U V W 

A

addHeader(String) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Adds header as an HTTP header.
addHeader(String, Object) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Adds a new header with the name and value.

B

build() - Method in class com.squareup.okhttp.internal.SslContextBuilder
 

C

clearHeaders() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Removes all HTTP headers including any "Content-Length" and "Transfer-encoding" headers that were added by default.
clone() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
com.squareup.okhttp.internal - package com.squareup.okhttp.internal
 
com.squareup.okhttp.internal.spdy - package com.squareup.okhttp.internal.spdy
 
com.squareup.okhttp.mockwebserver - package com.squareup.okhttp.mockwebserver
 

D

dispatch(RecordedRequest) - Method in class com.squareup.okhttp.mockwebserver.Dispatcher
Returns a response to satisfy request.
dispatch(RecordedRequest) - Method in class com.squareup.okhttp.mockwebserver.QueueDispatcher
 
Dispatcher - Class in com.squareup.okhttp.mockwebserver
Handler for mock server requests.
Dispatcher() - Constructor for class com.squareup.okhttp.mockwebserver.Dispatcher
 

E

enqueue(MockResponse) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Scripts response to be returned to a request made in sequence.
enqueueResponse(MockResponse) - Method in class com.squareup.okhttp.mockwebserver.QueueDispatcher
 

G

getBody() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Returns the raw HTTP payload, or null if this response is streamed.
getBody() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
Returns the body of this POST request.
getBodyDelayTimeMs() - 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.
getHeaders(String) - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
Returns the headers named name.
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.
getSocketPolicy() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
getSslProtocol() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
Returns the connection's SSL protocol like TLSv1, SSLv3, NONE or null if the connection doesn't use SSL.
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() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
getThrottleUnit() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
getUrl(String) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Returns a URL for connecting to this server.
getUtf8Body() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
Returns the body of this POST request decoded as a UTF-8 string.

L

localhost() - Static method in class com.squareup.okhttp.internal.SslContextBuilder
Returns a new SSL context for this host's current localhost address.

M

main(String...) - Static method in class com.squareup.okhttp.internal.spdy.SpdyServer
 
MockResponse - Class in com.squareup.okhttp.mockwebserver
A scripted response to be replayed by the mock web server.
MockResponse() - Constructor for class com.squareup.okhttp.mockwebserver.MockResponse
Creates a new mock response with an empty body.
MockWebServer - Class in com.squareup.okhttp.mockwebserver
A scriptable web server.
MockWebServer() - Constructor for class com.squareup.okhttp.mockwebserver.MockWebServer
 

P

peekSocketPolicy() - Method in class com.squareup.okhttp.mockwebserver.Dispatcher
Returns the socket policy of the next request.
peekSocketPolicy() - Method in class com.squareup.okhttp.mockwebserver.QueueDispatcher
 
play() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Equivalent to play(0).
play(int) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Starts the server, serves all enqueued requests, and shuts the server down.
PushPromise - Class in com.squareup.okhttp.mockwebserver
An HTTP request initiated by the server.
PushPromise(String, String, List<String>, MockResponse) - Constructor for class com.squareup.okhttp.mockwebserver.PushPromise
 

Q

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

R

receive(SpdyStream) - Method in class com.squareup.okhttp.internal.spdy.SpdyServer
 
RecordedRequest - Class in com.squareup.okhttp.mockwebserver
An HTTP request that came into the mock web server.
RecordedRequest(String, List<String>, List<Integer>, long, byte[], int, Socket) - Constructor for class com.squareup.okhttp.mockwebserver.RecordedRequest
 
removeHeader(String) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Removes all headers named name.
responseQueue - Variable in class com.squareup.okhttp.mockwebserver.QueueDispatcher
 

S

setBody(byte[]) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
setBody(InputStream, long) - 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.
setBodyDelayTimeMs(int) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Set the delayed time of the response body to delay.
setBodyLimit(int) - 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(byte[], 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.
setNpnEnabled(boolean) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Sets whether NPN is used on incoming HTTPS connections to negotiate a protocol like HTTP/1.1 or SPDY/3.
setNpnProtocols(List<Protocol>) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Indicates the protocols supported by NPN on incoming HTTPS connections.
setResponseCode(int) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
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.
SpdyServer - Class in com.squareup.okhttp.internal.spdy
A basic SPDY server that serves the contents of a local directory.
SpdyServer(File) - Constructor for class com.squareup.okhttp.internal.spdy.SpdyServer
 
SslContextBuilder - Class in com.squareup.okhttp.internal
Constructs an SSL context for testing.
SslContextBuilder(String) - Constructor for class com.squareup.okhttp.internal.SslContextBuilder
 

T

takeRequest() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Awaits the next HTTP request, removes it, and returns it.
throttleBody(int, long, TimeUnit) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
Throttles the response body writer to sleep for the given period after each series of bytesPerPeriod bytes are written.
toProxyAddress() - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
 
toString() - Method in class com.squareup.okhttp.mockwebserver.MockResponse
 
toString() - Method in class com.squareup.okhttp.mockwebserver.RecordedRequest
 

U

useHttps(SSLSocketFactory) - Method in class com.squareup.okhttp.internal.spdy.SpdyServer
 
useHttps(SSLSocketFactory, boolean) - Method in class com.squareup.okhttp.mockwebserver.MockWebServer
Serve requests with HTTPS rather than otherwise.

V

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

W

withPush(PushPromise) - Method in class com.squareup.okhttp.mockwebserver.MockResponse
When protocols include a SPDY variant, this attaches a pushed stream to this response.
A B C D E G L M P Q R S T U V W 

Copyright © 2014. All Rights Reserved.