public class StandaloneAhcWSResponse extends java.lang.Object implements StandaloneWSResponse
| Constructor and Description |
|---|
StandaloneAhcWSResponse(play.shaded.ahc.org.asynchttpclient.Response ahcResponse) |
StandaloneAhcWSResponse(play.shaded.ahc.org.asynchttpclient.Response ahcResponse,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
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.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAllHeaders()
Get all the HTTP headers of the response as a case-insensitive map
|
java.lang.String |
getBody() |
java.io.InputStream |
getBodyAsStream()
Get the response body as a stream
|
WSCookie |
getCookie(java.lang.String name)
Get only one cookie, using the cookie name.
|
java.util.List<WSCookie> |
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.lang.Object |
getUnderlying() |
java.net.URI |
getUri()
Return the request
URI. |
public StandaloneAhcWSResponse(play.shaded.ahc.org.asynchttpclient.Response ahcResponse,
com.fasterxml.jackson.databind.ObjectMapper mapper)
public StandaloneAhcWSResponse(play.shaded.ahc.org.asynchttpclient.Response ahcResponse)
public java.lang.Object getUnderlying()
getUnderlying in interface StandaloneWSResponsepublic int getStatus()
getStatus in interface StandaloneWSResponsepublic java.lang.String getStatusText()
getStatusText in interface StandaloneWSResponsepublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllHeaders()
getAllHeaders in interface StandaloneWSResponsepublic java.lang.String getHeader(java.lang.String key)
getHeader in interface StandaloneWSResponsekey - the header's namepublic java.util.List<WSCookie> getCookies()
getCookies in interface StandaloneWSResponsepublic WSCookie getCookie(java.lang.String name)
getCookie in interface StandaloneWSResponsename - the cookie namepublic java.lang.String getBody()
getBody in interface StandaloneWSResponsepublic org.w3c.dom.Document asXml()
DOM documentasXml in interface StandaloneWSResponsepublic com.fasterxml.jackson.databind.JsonNode asJson()
JsonNodeasJson in interface StandaloneWSResponsepublic java.io.InputStream getBodyAsStream()
getBodyAsStream in interface StandaloneWSResponsepublic byte[] asByteArray()
asByteArray in interface StandaloneWSResponsepublic java.net.URI getUri()
URI. Note that if the request got redirected, the value of the
URI will be the last valid redirect url.getUri in interface StandaloneWSResponseURI.