| 限定符和类型 | 类和说明 |
|---|---|
static class |
Request.Builder |
| 限定符和类型 | 方法和说明 |
|---|---|
RequestBody |
body() |
CacheControl |
cacheControl()
Returns the cache control directives for this response.
|
String |
header(String name) |
Headers |
headers() |
List<String> |
headers(String name) |
boolean |
isHttps() |
String |
method() |
Request.Builder |
newBuilder() |
Object |
tag()
Returns the tag attached with
Object.class as a key, or null if no tag is attached with
that key. |
<T> T |
tag(Class<? extends T> type)
Returns the tag attached with
type as a key, or null if no tag is attached with that
key. |
String |
toString() |
HttpUrl |
url() |
public HttpUrl url()
public String method()
public Headers headers()
@Nullable public RequestBody body()
@Nullable public Object tag()
Object.class as a key, or null if no tag is attached with
that key.
Prior to OkHttp 3.11, this method never returned null if no tag was attached. Instead it
returned either this request, or the request upon which this request was derived with newBuilder().
@Nullable public <T> T tag(Class<? extends T> type)
type as a key, or null if no tag is attached with that
key.public Request.Builder newBuilder()
public CacheControl cacheControl()
Cache-Control header.public boolean isHttps()
Copyright © 2025. All rights reserved.