public class HandyResponse extends Object implements Response, Browserable, Unwrappable
| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
HandyResponse(Response response) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUrl()
Returns the base form of the url used in this request
|
Browser |
getBrowser() |
byte[] |
getContent()
Returns raw content of the response
|
org.apache.http.entity.ContentType |
getContentType()
Returns the content type of the content fetched
|
String |
getHandyHtml()
Returns the html in string format with all relative
urls resolved to absolute urls
|
String |
getHandyHtml(Charset charset)
Returns the html in string format with all relative
urls resolved to absolute urls
|
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
|
ResponseValidator |
getValidator()
Returns the instance of validator used to validate this response
|
public static final Charset DEFAULT_CHARSET
public HandyResponse(Response response)
public int getStatusCode()
ResponsegetStatusCode in interface Responsepublic byte[] getContent()
ResponsegetContent in interface Responsepublic 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 org.apache.http.Header[] getHeaders()
ResponsegetHeaders in interface Responsepublic String getBaseUrl()
ResponsegetBaseUrl in interface Responsepublic org.apache.http.HttpHost getProxy()
Responsepublic ResponseValidator getValidator()
ResponsegetValidator in interface Responsepublic String getHandyHtml()
public String getHandyHtml(Charset charset)
charset - use specified charset for this html documentpublic String getHtml()
public String getHtml(Charset charset)
charset - use specified charset for this html documentpublic org.jsoup.nodes.Document getJsoup()
public org.jsoup.nodes.Document getJsoup(Charset charset)
charset - use specified charset for this html documentpublic Browser getBrowser()
getBrowser in interface Browserablepublic Response getInner()
UnwrappablegetInner in interface UnwrappableCopyright © 2018. All rights reserved.