public class VResponse extends Object implements Response, Unwrappable
| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET
The default charset to be used to decode response.
|
| Constructor and Description |
|---|
VResponse(Response response)
Constructs a VResponse.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUrl()
Returns the base form of the url used in this request.
|
byte[] |
getContent()
Returns raw content of the response.
|
org.apache.http.entity.ContentType |
getContentType()
Returns the content type of the content fetched.
|
org.apache.http.Header[] |
getHeaders()
Returns the headers that were used to trigger this response.
|
String |
getHtml()
Returns the html in string format.
|
String |
getHtml(Charset charset)
Returns the html in string format.
|
Response |
getInner()
Returns the unwrapped version of this request.
|
org.jsoup.nodes.Document |
getJsoup()
Returns a Jsoup document of this response.
|
org.jsoup.nodes.Document |
getJsoup(Charset charset)
Returns a Jsoup document of this response.
|
org.apache.http.HttpHost |
getProxy()
Returns the proxy that was used to trigger this response.
|
int |
getStatusCode()
Returns status code of the response.
|
Validator |
getValidator()
Returns the instance of validator used to validate this response.
|
public static final Charset DEFAULT_CHARSET
public VResponse(Response response)
response - An instance of responsepublic final int getStatusCode()
ResponsegetStatusCode in interface Responsepublic final byte[] getContent()
ResponsegetContent in interface Responsepublic final org.apache.http.entity.ContentType getContentType()
ResponseThis is provided by the server or guessed by the server or an amalgamation of both.
getContentType in interface Responsepublic final org.apache.http.Header[] getHeaders()
ResponsegetHeaders in interface Responsepublic final String getBaseUrl()
ResponsegetBaseUrl in interface Responsepublic final org.apache.http.HttpHost getProxy()
Responsepublic final Validator getValidator()
ResponsegetValidator in interface Responsepublic final String getHtml()
public final String getHtml(Charset charset)
charset - use specified charset for this html documentpublic final org.jsoup.nodes.Document getJsoup()
public final org.jsoup.nodes.Document getJsoup(Charset charset)
charset - use specified charset for this html documentpublic final Response getInner()
UnwrappablegetInner in interface UnwrappableCopyright © 2018. All rights reserved.