Package | Description |
---|---|
org.htmlunit |
Framework classes (contains the
WebClient
class which is the main entry point). |
org.htmlunit.attachment |
Attachment-related classes.
|
org.htmlunit.html |
Classes specific to HTML pages, particularly the
HtmlPage which represents
an HTML document and provides access to its content. |
org.htmlunit.html.parser |
Contains the html parser interface.
|
org.htmlunit.html.parser.neko |
Contains the neko html parser.
|
org.htmlunit.javascript.host.dom |
Implementations of the DOM JavaScript host objects - users of HtmlUnit shouldn't
need anything in this package.
|
org.htmlunit.util |
Miscellaneous utilities.
|
org.htmlunit.webstart |
Miscellaneous utilities.
|
org.htmlunit.xml |
Classes specific to XML pages.
|
Modifier and Type | Class and Description |
---|---|
class |
StringWebResponse
A simple WebResponse created from a string.
|
Modifier and Type | Method and Description |
---|---|
protected WebResponse |
HttpWebConnection.downloadResponse(org.apache.http.client.methods.HttpUriRequest httpMethod,
WebRequest webRequest,
org.apache.http.HttpResponse httpResponse,
long startTime)
Downloads the response.
|
WebResponse |
Cache.getCachedResponse(WebRequest request)
Returns the cached response corresponding to the specified request.
|
WebResponse |
FailingHttpStatusCodeException.getResponse()
Gets the failing response.
|
WebResponse |
WebConnection.getResponse(WebRequest request)
Submits a request and retrieves a response.
|
WebResponse |
MockWebConnection.getResponse(WebRequest request)
Submits a request and retrieves a response.
|
WebResponse |
HttpWebConnection.getResponse(WebRequest webRequest)
Submits a request and retrieves a response.
|
WebResponse |
SgmlPage.getWebResponse()
Returns the web response that was originally used to create this page.
|
WebResponse |
Page.getWebResponse()
Returns the web response that was originally used to create this page.
|
WebResponse |
AbstractPage.getWebResponse()
Returns the web response that was originally used to create this page.
|
WebResponse |
WebClient.loadWebResponse(WebRequest webRequest)
Loads a
WebResponse from the server. |
protected WebResponse |
HttpWebConnection.makeWebResponse(org.apache.http.HttpResponse httpResponse,
WebRequest webRequest,
DownloadedContent responseBody,
long loadTime)
Converts an HttpMethod into a
WebResponse . |
protected WebResponse |
HttpWebConnection.newWebResponseInstance(WebResponseData responseData,
long loadTime,
WebRequest webRequest)
Constructs an appropriate WebResponse.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Cache.cacheIfPossible(WebRequest request,
WebResponse response,
Object toCache)
Caches the specified object, if the corresponding request and response objects indicate
that it is cacheable.
|
protected HtmlPage |
DefaultPageCreator.createHtmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an HtmlPage for this WebResponse.
|
Page |
PageCreator.createPage(WebResponse webResponse,
WebWindow webWindow)
Create a Page object for the specified web response.
|
Page |
DefaultPageCreator.createPage(WebResponse webResponse,
WebWindow webWindow)
Create a Page object for the specified web response.
|
protected TextPage |
DefaultPageCreator.createTextPage(WebResponse webResponse,
WebWindow webWindow)
Creates a TextPage for this WebResponse.
|
protected UnexpectedPage |
DefaultPageCreator.createUnexpectedPage(WebResponse webResponse,
WebWindow webWindow)
Creates an UnexpectedPage for this WebResponse.
|
protected XHtmlPage |
DefaultPageCreator.createXHtmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an XHtmlPage for this WebResponse.
|
protected SgmlPage |
DefaultPageCreator.createXmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an SgmlPage for this WebResponse.
|
static DefaultPageCreator.PageType |
DefaultPageCreator.determinePageType(WebResponse webResponse)
Determines the kind of page to create from the content type.
|
protected boolean |
Cache.isCacheable(WebRequest request,
WebResponse response)
Determines if the specified response can be cached.
|
protected boolean |
Cache.isCacheableContent(WebResponse response)
Perform prior validation for 'no-store' directive in Cache-Control header.
|
Page |
WebClient.loadWebResponseInto(WebResponse webResponse,
WebWindow webWindow)
Creates a page based on the specified response and inserts it into the specified window.
|
Page |
WebClient.loadWebResponseInto(WebResponse webResponse,
WebWindow webWindow,
String forceAttachmentWithFilename)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
protected static Date |
Cache.parseDateHeader(WebResponse response,
String headerName)
Parses and returns the specified date header of the specified response.
|
void |
WebClient.printContentIfNecessary(WebResponse webResponse)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
void |
WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebResponse webResponse)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
Constructor and Description |
---|
AbstractPage(WebResponse webResponse,
WebWindow enclosingWindow)
Creates an instance.
|
FailingHttpStatusCodeException(String message,
WebResponse failingResponse)
Creates an instance.
|
FailingHttpStatusCodeException(WebResponse failingResponse)
Creates an instance.
|
SgmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an instance of SgmlPage.
|
TextPage(WebResponse webResponse,
WebWindow enclosingWindow)
Creates an instance.
|
UnexpectedPage(WebResponse webResponse,
WebWindow enclosingWindow)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
AttachmentHandler.handleAttachment(WebResponse response,
String attachmentFilename)
Process the specified attachment.
|
default boolean |
AttachmentHandler.isAttachment(WebResponse response)
Returns
true if the specified response represents an attachment. |
Modifier and Type | Method and Description |
---|---|
WebResponse |
HtmlLink.getWebResponse(boolean downloadIfNeeded)
POTENIAL PERFORMANCE KILLER - DOWNLOADS THE RESOURCE - USE AT YOUR OWN RISK.
|
WebResponse |
HtmlImage.getWebResponse(boolean downloadIfNeeded)
Returns the
WebResponse for the image contained by this image element. |
WebResponse |
HtmlLink.getWebResponse(boolean downloadIfNeeded,
WebRequest request)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
Constructor and Description |
---|
HtmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates an instance of HtmlPage.
|
XHtmlPage(WebResponse webResponse,
WebWindow webWindow)
Creates a new XHTML page instance.
|
Modifier and Type | Method and Description |
---|---|
void |
HTMLParser.parse(WebResponse webResponse,
HtmlPage page,
boolean xhtml,
boolean createdByJavascript)
Parses the WebResponse into an object tree representation.
|
Modifier and Type | Method and Description |
---|---|
void |
HtmlUnitNekoHtmlParser.parse(WebResponse webResponse,
HtmlPage page,
boolean xhtml,
boolean createdByJavascript)
Parses the WebResponse into an object tree representation.
|
Modifier and Type | Method and Description |
---|---|
static Document |
DOMParser.parseHtmlDocument(HtmlUnitScriptable scriptable,
WebResponse webResponse,
WebWindow webWindow)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
Modifier and Type | Class and Description |
---|---|
class |
WebResponseWrapper
Provides a convenient implementation of the
WebResponse interface that can be subclassed
by developers wishing to adapt a particular WebResponse. |
Modifier and Type | Method and Description |
---|---|
protected WebResponse |
FalsifyingWebConnection.createWebResponse(WebRequest wr,
String content,
String contentType)
Creates a faked WebResponse for the request with the provided content.
|
protected WebResponse |
FalsifyingWebConnection.createWebResponse(WebRequest wr,
String content,
String contentType,
int responseCode,
String responseMessage)
Creates a faked WebResponse for the request with the provided content.
|
protected WebResponse |
FalsifyingWebConnection.deliverFromAlternateUrl(WebRequest webRequest,
URL url)
Delivers the content for an alternate URL as if it comes from the requested URL.
|
WebResponse |
WebConnectionWrapper.getResponse(WebRequest request)
Submits a request and retrieves a response.
|
WebResponse |
DebuggingWebConnection.getResponse(WebRequest request)
Calls the wrapped webconnection and save the received response.
|
protected WebResponse |
FalsifyingWebConnection.replaceContent(WebResponse wr,
String newContent)
Builds a WebResponse with new content, preserving all other information.
|
protected WebResponse |
DebuggingWebConnection.uncompressJavaScript(WebResponse response)
Tries to uncompress the JavaScript code in the provided response.
|
Modifier and Type | Method and Description |
---|---|
static Document |
XmlUtils.buildDocument(WebResponse webResponse)
Builds a document from the content of the web response.
|
static boolean |
HeaderUtils.containsETag(WebResponse response) |
static boolean |
HeaderUtils.containsLastModified(WebResponse response) |
static boolean |
HeaderUtils.containsMaxAge(WebResponse response) |
static boolean |
HeaderUtils.containsMaxAgeOrSMaxage(WebResponse response) |
static boolean |
HeaderUtils.containsNoCache(WebResponse response) |
static boolean |
HeaderUtils.containsNoStore(WebResponse response) |
static boolean |
HeaderUtils.containsPrivate(WebResponse response) |
static boolean |
HeaderUtils.containsPublic(WebResponse response) |
static boolean |
HeaderUtils.containsSMaxage(WebResponse response) |
static long |
HeaderUtils.maxAge(WebResponse response) |
protected WebResponse |
FalsifyingWebConnection.replaceContent(WebResponse wr,
String newContent)
Builds a WebResponse with new content, preserving all other information.
|
protected void |
DebuggingWebConnection.saveResponse(WebResponse response,
WebRequest request)
Saves the response content in the temp dir and adds it to the summary page.
|
static long |
HeaderUtils.sMaxage(WebResponse response) |
protected WebResponse |
DebuggingWebConnection.uncompressJavaScript(WebResponse response)
Tries to uncompress the JavaScript code in the provided response.
|
Constructor and Description |
---|
WebResponseWrapper(WebResponse webResponse)
Constructs a WebResponse object wrapping provided WebResponse.
|
Modifier and Type | Method and Description |
---|---|
void |
WebStartHandler.handleJnlpResponse(WebResponse webResponse)
Handles the jnlp file response.
|
Constructor and Description |
---|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow)
Creates an instance.
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow,
boolean ignoreSAXException)
Creates an instance.
|
XmlPage(WebResponse webResponse,
WebWindow enclosingWindow,
boolean ignoreSAXException,
boolean handleXHTMLAsHTML)
Creates an instance.
|
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.