public class Response<T> extends Object implements Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
protected List<Cookie> |
cookies |
protected Headers |
headers |
protected int |
statusCode |
protected String |
url |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
body()
Return the body part.
|
List<Cookie> |
cookies()
Get all cookies returned by this response
|
T |
getBody()
已过时。
use
body() |
@Nullable Cookie |
getCookie(String name)
Get first cookie match the name returned by this response, return null if not found
|
List<Cookie> |
getCookies()
已过时。
using
cookies |
@Nullable Cookie |
getFirstCookie(String name)
已过时。
using {
getCookie(String)} instead |
@Nullable String |
getFirstHeader(String name)
已过时。
using
getHeader(String) instead |
@Nullable String |
getHeader(String name)
Get first header value match the name, return null if not exists
|
List<Header> |
getHeaders()
已过时。
using
headers |
List<String> |
getHeaders(String name)
Get all headers values with name.
|
int |
getStatusCode()
已过时。
using
statusCode |
String |
getURL()
已过时。
using
url |
List<Header> |
headers()
Return all response headers
|
int |
statusCode()
return response status code
|
String |
url()
return actual url (redirected)
|
protected final String url
protected final int statusCode
protected final Headers headers
@Deprecated public T getBody()
body()public T body()
@Deprecated public String getURL()
urlpublic String url()
@Deprecated public int getStatusCode()
statusCodepublic int statusCode()
@Deprecated public List<Cookie> getCookies()
cookies@Deprecated public List<Header> getHeaders()
headers@Deprecated public @Nullable Cookie getFirstCookie(String name)
getCookie(String)} insteadpublic @Nullable Cookie getCookie(String name)
@Deprecated public @Nullable String getFirstHeader(String name)
getHeader(String) insteadpublic @Nullable String getHeader(String name)
Copyright © 2019. All rights reserved.