| Package | Description |
|---|---|
| okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
| okhttp3.internal | |
| okhttp3.internal.http | |
| okhttp3.internal.http1 | |
| okhttp3.mockwebserver |
| Modifier and Type | Method and Description |
|---|---|
Headers |
Headers.Builder.build() |
Headers |
Response.headers() |
Headers |
MultipartBody.Part.headers() |
Headers |
Request.headers() |
static Headers |
Headers.of(Map<String,String> headers)
Returns headers for the header names and values in the
Map. |
static Headers |
Headers.of(String... namesAndValues)
Returns headers for the alternating header names and values.
|
| Modifier and Type | Method and Description |
|---|---|
MultipartBody.Builder |
MultipartBody.Builder.addPart(Headers headers,
RequestBody body)
Add a part to the body.
|
static MultipartBody.Part |
MultipartBody.Part.create(Headers headers,
RequestBody body) |
Response.Builder |
Response.Builder.headers(Headers headers)
Removes all headers on this builder and adds
headers. |
Request.Builder |
Request.Builder.headers(Headers headers)
Removes all headers on this builder and adds
headers. |
static CacheControl |
CacheControl.parse(Headers headers)
Returns the cache directives of
headers. |
static List<Cookie> |
Cookie.parseAll(HttpUrl url,
Headers headers)
Returns all of the cookies from a set of HTTP response headers.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<String,List<String>> |
JavaNetHeaders.toMultimap(Headers headers,
String valueForNullKey)
Returns an immutable map containing each field to its list of values.
|
| Modifier and Type | Method and Description |
|---|---|
static Headers |
HttpHeaders.varyHeaders(Headers requestHeaders,
Headers responseHeaders)
Returns the subset of the headers in
requestHeaders that impact the content of
response's body. |
static Headers |
HttpHeaders.varyHeaders(Response response)
Returns the subset of the headers in
response's request that impact the content of
response's body. |
| Modifier and Type | Method and Description |
|---|---|
static long |
HttpHeaders.contentLength(Headers headers) |
static boolean |
HttpHeaders.hasVaryAll(Headers responseHeaders)
Returns true if a Vary header contains an asterisk.
|
static List<Challenge> |
HttpHeaders.parseChallenges(Headers responseHeaders,
String challengeHeader)
Parse RFC 2617 challenges, also wrong ordered ones.
|
static void |
HttpHeaders.receiveHeaders(CookieJar cookieJar,
HttpUrl url,
Headers headers) |
static Set<String> |
HttpHeaders.varyFields(Headers responseHeaders)
Returns the names of the request headers that need to be checked for equality when caching.
|
static Headers |
HttpHeaders.varyHeaders(Headers requestHeaders,
Headers responseHeaders)
Returns the subset of the headers in
requestHeaders that impact the content of
response's body. |
static boolean |
HttpHeaders.varyMatches(Response cachedResponse,
Headers cachedRequest,
Request newRequest)
Returns true if none of the Vary headers have changed between
cachedRequest and newRequest. |
| Constructor and Description |
|---|
RealResponseBody(Headers headers,
okio.BufferedSource source) |
| Modifier and Type | Method and Description |
|---|---|
Headers |
Http1Codec.readHeaders()
Reads headers or trailers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Http1Codec.writeRequest(Headers headers,
String requestLine)
Returns bytes of a request header for sending on an HTTP transport.
|
| Modifier and Type | Method and Description |
|---|---|
Headers |
MockResponse.getHeaders()
Returns the HTTP headers, such as "Content-Length: 0".
|
Headers |
RecordedRequest.getHeaders()
Returns all headers.
|
Headers |
PushPromise.headers() |
| Modifier and Type | Method and Description |
|---|---|
MockResponse |
MockResponse.setHeaders(Headers headers)
Replaces all headers with those specified in
headers. |
| Constructor and Description |
|---|
PushPromise(String method,
String path,
Headers headers,
MockResponse response) |
RecordedRequest(String requestLine,
Headers headers,
List<Integer> chunkSizes,
long bodySize,
okio.Buffer body,
int sequenceNumber,
Socket socket) |
Copyright © 2017. All Rights Reserved.