public static class WS.Response
extends java.lang.Object
Constructor and Description |
---|
WS.Response(com.ning.http.client.Response ahcResponse) |
Modifier and Type | Method and Description |
---|---|
byte[] |
asByteArray()
Get the response body as a byte array
|
org.codehaus.jackson.JsonNode |
asJson()
Get the response body as a
JsonNode |
org.w3c.dom.Document |
asXml()
Get the response body as a
DOM document |
java.lang.String |
getBody()
Get the response body as a string.
|
java.io.InputStream |
getBodyAsStream()
Get the response body as a stream
|
java.lang.String |
getHeader(java.lang.String key)
Get the given HTTP header of the response
|
int |
getStatus()
Get the HTTP status code of the response
|
java.lang.String |
getStatusText()
Get the HTTP status text of the response
|
java.net.URI |
getUri()
Return the request
URI . |
public int getStatus()
public java.lang.String getStatusText()
public java.lang.String getHeader(java.lang.String key)
public java.lang.String getBody()
public org.w3c.dom.Document asXml()
DOM document
public org.codehaus.jackson.JsonNode asJson()
JsonNode
public java.io.InputStream getBodyAsStream()
public byte[] asByteArray()
public java.net.URI getUri()
URI
. Note that if the request got redirected, the value of the
URI
will be the last valid redirect url.URI
.