public final class OkHeaders extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RECEIVED_MILLIS
Synthetic response header: the local time when the response was received.
|
static String |
RESPONSE_SOURCE
Synthetic response header: the location from which the response was loaded.
|
static String |
SELECTED_PROTOCOL
Synthetic response header: the selected
protocol ("spdy/3.1", "http/1.1", etc).
|
static String |
SENT_MILLIS
Synthetic response header: the local time when the request was sent.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
contentLength(Headers
|
static long |
contentLength(Request
|
static long |
contentLength(Response
|
static boolean |
hasVaryAll(Headers
Returns true if a Vary header contains an asterisk.
|
static boolean |
hasVaryAll(Response
Returns true if a Vary header contains an asterisk.
|
static List |
parseChallenges(Headers
Parse RFC 2617 challenges.
|
static Set |
varyFields(Headers
Returns the names of the request headers that need to be checked for equality when caching.
|
static Headers |
varyHeaders(Headers
Returns the subset of the headers in
requestHeaders that impact the content of response's body.
|
static Headers |
varyHeaders(Response
Returns the subset of the headers in
response's request that impact the content of response's body.
|
static boolean |
varyMatches(Response
Returns true if none of the Vary headers have changed between
cachedRequest and
newRequest.
|
public static final StringSENT_MILLIS
public static final StringRECEIVED_MILLIS
public static final StringSELECTED_PROTOCOL
protocol ("spdy/3.1", "http/1.1", etc).
public static final StringRESPONSE_SOURCE
public static long contentLength(Requestrequest)
public static long contentLength(Responseresponse)
public static long contentLength(Headersheaders)
public static boolean varyMatches(ResponsecachedResponse, Headers cachedRequest, Request newRequest)
cachedRequest and
newRequest.
public static boolean hasVaryAll(Responseresponse)
public static boolean hasVaryAll(HeadersresponseHeaders)
public static Set<String > varyFields(Headers responseHeaders)
public static HeadersvaryHeaders(Response response)
response's request that impact the content of response's body.
public static HeadersvaryHeaders(Headers requestHeaders, Headers responseHeaders)
requestHeaders that impact the content of response's body.