Package | Description |
---|---|
okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
okhttp3.internal | |
okhttp3.internal.http | |
okhttp3.internal.http1 |
Modifier and Type | Method and Description |
---|---|
Headers |
Headers.Builder.build() |
Headers |
Request.headers() |
Headers |
MultipartBody.Part.headers() |
Headers |
Response.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) |
Request.Builder |
Request.Builder.headers(Headers headers)
Removes all headers on this builder and adds
headers . |
Response.Builder |
Response.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 7617 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 . |
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.
|
Copyright © 2018. All rights reserved.