public abstract static class WS.HttpResponse
extends java.lang.Object
Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
The http response content type
|
java.lang.String |
getEncoding() |
abstract java.lang.String |
getHeader(java.lang.String key) |
abstract java.util.List<Http.Header> |
getHeaders() |
com.google.gson.JsonElement |
getJson()
get the response body as a
JsonElement |
java.util.Map<java.lang.String,java.lang.String> |
getQueryString()
Parse the response string as a query string.
|
abstract java.lang.Integer |
getStatus()
the HTTP status code
|
abstract java.lang.String |
getStatusText()
The HTTP status text
|
abstract java.io.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 java.lang.String |
getString()
get the response body as a string
|
abstract java.lang.String |
getString(java.lang.String encoding)
get the response body as a string
|
org.w3c.dom.Document |
getXml()
Parse and get the response body as a
DOM document |
org.w3c.dom.Document |
getXml(java.lang.String encoding)
parse and get the response body as a
DOM document |
boolean |
success() |
public abstract java.lang.Integer getStatus()
public abstract java.lang.String getStatusText()
public boolean success()
public java.lang.String getContentType()
public java.lang.String getEncoding()
public abstract java.lang.String getHeader(java.lang.String key)
public abstract java.util.List<Http.Header> getHeaders()
public org.w3c.dom.Document getXml()
DOM document
public org.w3c.dom.Document getXml(java.lang.String encoding)
DOM document
encoding
- xml charset encodingpublic abstract java.lang.String getString()
public abstract java.lang.String getString(java.lang.String encoding)
encoding
- string charset encodingpublic java.util.Map<java.lang.String,java.lang.String> getQueryString()
public abstract java.io.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