Modifier and Type | Class and Description |
---|---|
static class |
Request.Builder |
Modifier and Type | Method and Description |
---|---|
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 © 2018. All rights reserved.