public class Response extends Object
Constructor and Description |
---|
Response(com.ning.http.client.Response ahcResponse) |
Modifier and Type | Method and Description |
---|---|
void |
addBodyReader(BodyReader br) |
void |
addBodyReaders(List<BodyReader> bodyReaders) |
String |
getBody()
Get the response body as a string
|
String |
getBody(String charset)
Get the response body as a string with charset as parameter
|
List<com.ning.http.client.cookie.Cookie> |
getCookies()
Get the cookies sent along the response
|
String |
getHeader(String key)
Get the given HTTP header of the response
|
int |
getStatus()
Get the HTTP status code of the response
|
<T> T |
resource(Class<T> type) |
<T> T |
resource(Class<T> type,
String charset) |
<T> T |
resource(com.fasterxml.jackson.core.type.TypeReference valueTypeRef) |
<T> T |
resource(com.fasterxml.jackson.core.type.TypeReference valueTypeRef,
String charset) |
public void addBodyReader(BodyReader br)
public void addBodyReaders(List<BodyReader> bodyReaders)
public <T> T resource(Class<T> type)
public <T> T resource(com.fasterxml.jackson.core.type.TypeReference valueTypeRef)
public <T> T resource(com.fasterxml.jackson.core.type.TypeReference valueTypeRef, String charset)
public int getStatus()
public String getBody()
public String getBody(String charset)
public List<com.ning.http.client.cookie.Cookie> getCookies()
Copyright © 2009–2014. All rights reserved.