| 程序包 | 说明 |
|---|---|
| com.lark.oapi.okhttp |
An HTTP+HTTP/2 client for Android and Java applications.
|
| com.lark.oapi.okhttp.internal | |
| com.lark.oapi.okhttp.internal.connection | |
| com.lark.oapi.okhttp.internal.http | |
| com.lark.oapi.okhttp.internal.http1 | |
| com.lark.oapi.okhttp.internal.http2 |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
Headers |
Response.trailers()
Returns the trailers after the HTTP response, which may be empty.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Headers.Builder |
Headers.Builder.addAll(Headers headers)
Adds all headers from an existing collection.
|
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.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static Headers |
Util.EMPTY_HEADERS |
| 限定符和类型 | 方法和说明 |
|---|---|
static Headers |
Util.toHeaders(List<Header> headerBlock) |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Header> |
Util.toHeaderBlock(Headers headers) |
| 限定符和类型 | 方法和说明 |
|---|---|
Headers |
Exchange.trailers() |
| 限定符和类型 | 方法和说明 |
|---|---|
Headers |
ExchangeCodec.trailers()
Returns the trailers after the HTTP response.
|
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. |
| 限定符和类型 | 方法和说明 |
|---|---|
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 headerName)
Parse RFC 7235 challenges.
|
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. |
| 限定符和类型 | 方法和说明 |
|---|---|
Headers |
Http1ExchangeCodec.trailers() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Http1ExchangeCodec.writeRequest(Headers headers,
String requestLine)
Returns bytes of a request header for sending on an HTTP transport.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Headers |
Http2Stream.takeHeaders()
Removes and returns the stream's received response headers, blocking if necessary until headers
have been received.
|
Headers |
Http2Stream.trailers()
Returns the trailers.
|
Headers |
Http2ExchangeCodec.trailers() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Http2Stream.enqueueTrailers(Headers trailers) |
static Response.Builder |
Http2ExchangeCodec.readHttp2HeadersList(Headers headerBlock,
Protocol protocol)
Returns headers for a name value block containing an HTTP/2 response.
|
Copyright © 2022. All rights reserved.