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()
Response
getStatusCode
in interface Response
public final byte[] getContent()
Response
getContent
in interface Response
public final org.apache.http.entity.ContentType getContentType()
Response
This is provided by the server or guessed by the server or an amalgamation of both.
getContentType
in interface Response
public final org.apache.http.Header[] getHeaders()
Response
getHeaders
in interface Response
public final String getBaseUrl()
Response
getBaseUrl
in interface Response
public final org.apache.http.HttpHost getProxy()
Response
public final Validator getValidator()
Response
getValidator
in interface Response
public 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()
Unwrappable
getInner
in interface Unwrappable
Copyright © 2018. All rights reserved.