public interface WSResponse
extends play.libs.ws.StandaloneWSResponse
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asByteArray()
Gets the body as an array of bytes.
|
com.fasterxml.jackson.databind.JsonNode |
asJson()
Gets the body as JSON node.
|
org.w3c.dom.Document |
asXml()
return the body as XML.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAllHeaders()
Deprecated.
|
java.lang.String |
getBody() |
<T> T |
getBody(play.libs.ws.BodyReadable<T> readable)
Gets the body of the response as a T, using a
BodyReadable. |
akka.util.ByteString |
getBodyAsBytes() |
akka.stream.javadsl.Source<akka.util.ByteString,?> |
getBodyAsSource() |
java.io.InputStream |
getBodyAsStream()
Deprecated.
use
getBody(BodyReadable) with WSBodyWritables.inputStream(). |
java.lang.String |
getContentType() |
java.util.Optional<play.libs.ws.WSCookie> |
getCookie(java.lang.String name) |
java.util.List<play.libs.ws.WSCookie> |
getCookies() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders() |
java.util.List<java.lang.String> |
getHeaderValues(java.lang.String name) |
java.util.Optional<java.lang.String> |
getSingleHeader(java.lang.String name) |
int |
getStatus() |
java.lang.String |
getStatusText() |
java.lang.Object |
getUnderlying()
Gets the underlying implementation response object, if any.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
getHeaders in interface play.libs.ws.StandaloneWSResponsejava.util.List<java.lang.String> getHeaderValues(java.lang.String name)
getHeaderValues in interface play.libs.ws.StandaloneWSResponsejava.util.Optional<java.lang.String> getSingleHeader(java.lang.String name)
getSingleHeader in interface play.libs.ws.StandaloneWSResponse@Deprecated java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllHeaders()
java.lang.Object getUnderlying()
getUnderlying in interface play.libs.ws.StandaloneWSResponsejava.lang.String getContentType()
getContentType in interface play.libs.ws.StandaloneWSResponseint getStatus()
getStatus in interface play.libs.ws.StandaloneWSResponsejava.lang.String getStatusText()
getStatusText in interface play.libs.ws.StandaloneWSResponsejava.util.List<play.libs.ws.WSCookie> getCookies()
getCookies in interface play.libs.ws.StandaloneWSResponsejava.util.Optional<play.libs.ws.WSCookie> getCookie(java.lang.String name)
getCookie in interface play.libs.ws.StandaloneWSResponsejava.lang.String getBody()
getBody in interface play.libs.ws.StandaloneWSResponseakka.util.ByteString getBodyAsBytes()
getBodyAsBytes in interface play.libs.ws.StandaloneWSResponseakka.stream.javadsl.Source<akka.util.ByteString,?> getBodyAsSource()
getBodyAsSource in interface play.libs.ws.StandaloneWSResponse<T> T getBody(play.libs.ws.BodyReadable<T> readable)
BodyReadable.
See WSBodyReadables for convenient functions.getBody in interface play.libs.ws.StandaloneWSResponseT - the type to return, i.e. String.readable - a transformation function from a response to a T.org.w3c.dom.Document asXml()
com.fasterxml.jackson.databind.JsonNode asJson()
@Deprecated java.io.InputStream getBodyAsStream()
getBody(BodyReadable) with WSBodyWritables.inputStream().byte[] asByteArray()