public class Response<T> extends Object
| 构造器和说明 |
|---|
Response(int statusCode,
List<Cookie> cookies,
net.dongliu.requests.Headers headers,
T body) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
getBody() |
Collection<Cookie> |
getCookies()
Get all returned cookies
|
Cookie |
getFirstCookie(String name)
Get first cookie match the name, return null if not exists
|
String |
getFirstHeader(String name)
Get first header value match the name, return null if not exists
|
List<Parameter<String>> |
getHeaders()
Get all response headers
|
List<String> |
getHeaders(String name)
Get all headers values with name.
|
int |
getStatusCode() |
public int getStatusCode()
@Nonnull public Collection<Cookie> getCookies()
@Nullable public Cookie getFirstCookie(String name)
@Nullable public String getFirstHeader(String name)
@Nonnull public List<String> getHeaders(String name)
public T getBody()
Copyright © 2017. All rights reserved.