|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplay.libs.WS.Response
public static class WS.Response
A WS response.
| Constructor Summary | |
|---|---|
WS.Response(com.ning.http.client.Response ahcResponse)
|
|
| Method Summary | |
|---|---|
byte[] |
asByteArray()
Get the response body as a byte array |
com.fasterxml.jackson.databind.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 |
WS.Cookie |
getCookie(java.lang.String name)
Get only one cookie, using the cookie name. |
java.util.List<WS.Cookie> |
getCookies()
Get all the cookies. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WS.Response(com.ning.http.client.Response ahcResponse)
| Method Detail |
|---|
public int getStatus()
public java.lang.String getStatusText()
public java.lang.String getHeader(java.lang.String key)
public java.util.List<WS.Cookie> getCookies()
public WS.Cookie getCookie(java.lang.String name)
public java.lang.String getBody()
public org.w3c.dom.Document asXml()
DOM document
public com.fasterxml.jackson.databind.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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||