public abstract static class WS.HttpResponse extends Object
Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
The http response content type
|
String |
getEncoding() |
abstract String |
getHeader(String key) |
abstract List<Http.Header> |
getHeaders() |
com.google.gson.JsonElement |
getJson()
get the response body as a
JsonElement |
Map<String,String> |
getQueryString()
Parse the response string as a query string.
|
abstract Integer |
getStatus()
the HTTP status code
|
abstract String |
getStatusText()
The HTTP status text
|
abstract InputStream |
getStream()
get the response as a stream
+ this method can only be called onced because async implementation
does not allow it to be called + multiple times +
|
abstract String |
getString()
get the response body as a string
|
abstract String |
getString(String encoding)
get the response body as a string
|
Document |
getXml()
Parse and get the response body as a
DOM document |
Document |
getXml(String encoding)
parse and get the response body as a
DOM document |
boolean |
success() |
public abstract Integer getStatus()
public abstract String getStatusText()
public boolean success()
public String getContentType()
public String getEncoding()
public abstract List<Http.Header> getHeaders()
public Document getXml()
DOM document
public Document getXml(String encoding)
DOM document
encoding
- xml charset encodingpublic abstract String getString()
public abstract String getString(String encoding)
encoding
- string charset encodingpublic Map<String,String> getQueryString()
public abstract InputStream getStream()
+ this method can only be called onced because async implementation does not allow it to be called + multiple times +
public com.google.gson.JsonElement getJson()
JsonElement
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly