Uses of Class
org.htmlunit.WebResponse
-
Packages that use WebResponse Package Description org.htmlunit Framework classes (contains theWebClient
class which is the main entry point).org.htmlunit.attachment Attachment-related classes.org.htmlunit.html Classes specific to HTML pages, particularly theHtmlPage
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.xml Implementations of the XML 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. -
-
Uses of WebResponse in org.htmlunit
Subclasses of WebResponse in org.htmlunit Modifier and Type Class Description class
StringWebResponse
A simple WebResponse created from a string.(package private) class
WebResponseFromCache
AWebResponse
implementation to deliver with content from cache.Fields in org.htmlunit declared as WebResponse Modifier and Type Field Description private WebResponse
Cache.Entry. response_
private WebResponse
FailingHttpStatusCodeException. response_
private WebResponse
WebClient.LoadJob. response_
private WebResponse
AbstractPage. webResponse_
private WebResponse
SgmlPage. webResponse_
Methods in org.htmlunit that return WebResponse Modifier and Type Method 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
HttpWebConnection. getResponse(WebRequest webRequest)
Submits a request and retrieves a response.WebResponse
MockWebConnection. getResponse(WebRequest request)
Submits a request and retrieves a response.WebResponse
WebConnection. getResponse(WebRequest request)
Submits a request and retrieves a response.WebResponse
AbstractPage. 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
SgmlPage. getWebResponse()
Returns the web response that was originally used to create this page.private WebResponse
WebClient. getWebResponseOrUseCached(WebRequest webRequest, WebResponse cached)
Returns the cached response provided for the request if usable otherwise makes the request and returns the response.WebResponse
WebClient. loadWebResponse(WebRequest webRequest)
Loads aWebResponse
from the server.private WebResponse
WebClient. loadWebResponseFromWebConnection(WebRequest webRequest, int allowedRedirects)
Loads aWebResponse
from the server through the WebConnection.protected WebResponse
HttpWebConnection. makeWebResponse(org.apache.http.HttpResponse httpResponse, WebRequest webRequest, DownloadedContent responseBody, long loadTime)
Converts an HttpMethod into aWebResponse
.private static WebResponse
WebClient. makeWebResponseForAboutUrl(WebRequest webRequest)
private WebResponse
WebClient. makeWebResponseForBlobUrl(WebRequest webRequest)
private WebResponse
WebClient. makeWebResponseForDataUrl(WebRequest webRequest)
private WebResponse
WebClient. makeWebResponseForFileUrl(WebRequest webRequest)
Builds a WebResponse for a file URL.private WebResponse
WebClient. makeWebResponseForJavaScriptUrl(WebWindow webWindow, java.net.URL url, java.nio.charset.Charset charset)
protected WebResponse
HttpWebConnection. newWebResponseInstance(WebResponseData responseData, long loadTime, WebRequest webRequest)
Constructs an appropriate WebResponse.Methods in org.htmlunit with parameters of type WebResponse Modifier and Type Method Description private static java.lang.String
FailingHttpStatusCodeException. buildMessage(WebResponse failingResponse)
boolean
Cache. cacheIfPossible(WebRequest request, WebResponse response, java.lang.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
DefaultPageCreator. createPage(WebResponse webResponse, WebWindow webWindow)
Create a Page object for the specified web response.Page
PageCreator. 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.private WebResponse
WebClient. getWebResponseOrUseCached(WebRequest webRequest, WebResponse cached)
Returns the cached response provided for the request if usable otherwise makes the request and returns the response.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.(package private) static boolean
Cache. isWithinCacheWindow(WebResponse response, long now, long createdAt)
Find expiry time using a) s-maxage specified
b) max-age specified
c) expired specified
d) A Last-Update is specified and the time is now within 10% of the difference between download time and update timePage
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, boolean forceAttachment)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.protected static java.util.Date
Cache. parseDateHeader(WebResponse response, java.lang.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.Constructors in org.htmlunit with parameters of type WebResponse Constructor Description AbstractPage(WebResponse webResponse, WebWindow enclosingWindow)
Creates an instance.Entry(java.lang.String key, WebResponse response, java.lang.Object value)
FailingHttpStatusCodeException(java.lang.String message, WebResponse failingResponse)
Creates an instance.FailingHttpStatusCodeException(WebResponse failingResponse)
Creates an instance.LoadJob(WebRequest request, WebResponse response, WebWindow requestingWindow, java.lang.String target, boolean forceAttachment)
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.WebResponseFromCache(WebResponse cachedResponse, java.util.List<NameValuePair> overwriteHeaders, WebRequest currentRequest)
Wraps the provided cached response for a new request.WebResponseFromCache(WebResponse cachedResponse, WebRequest currentRequest)
Wraps the provided response for the given request -
Uses of WebResponse in org.htmlunit.attachment
Methods in org.htmlunit.attachment with parameters of type WebResponse Modifier and Type Method Description default boolean
AttachmentHandler. handleAttachment(WebResponse response)
Process the specified attachment.default boolean
AttachmentHandler. isAttachment(WebResponse response)
Returnstrue
if the specified response represents an attachment. -
Uses of WebResponse in org.htmlunit.html
Fields in org.htmlunit.html declared as WebResponse Modifier and Type Field Description private WebResponse
HtmlImage. imageWebResponse_
private WebResponse
HtmlImageInput. imageWebResponse_
Methods in org.htmlunit.html that return WebResponse Modifier and Type Method Description WebResponse
HtmlImage. getWebResponse(boolean downloadIfNeeded)
Returns theWebResponse
for the image contained by this image element.WebResponse
HtmlLink. getWebResponse(boolean downloadIfNeeded)
POTENIAL PERFORMANCE KILLER - DOWNLOADS THE RESOURCE - USE AT YOUR OWN RISK.
If the linked content is not already downloaded it triggers a download.WebResponse
HtmlLink. getWebResponse(boolean downloadIfNeeded, WebRequest request)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
If the linked content is not already downloaded it triggers a download.Methods in org.htmlunit.html with parameters of type WebResponse Modifier and Type Method Description private static java.lang.String
XmlSerializer. getSuffix(WebResponse response)
Constructors in org.htmlunit.html with parameters of type WebResponse Constructor Description HtmlPage(WebResponse webResponse, WebWindow webWindow)
Creates an instance of HtmlPage.XHtmlPage(WebResponse webResponse, WebWindow webWindow)
Creates a new XHTML page instance. -
Uses of WebResponse in org.htmlunit.html.parser
Methods in org.htmlunit.html.parser with parameters of type WebResponse Modifier and Type Method Description void
HTMLParser. parse(WebResponse webResponse, HtmlPage page, boolean xhtml, boolean createdByJavascript)
Parses the WebResponse into an object tree representation. -
Uses of WebResponse in org.htmlunit.html.parser.neko
Methods in org.htmlunit.html.parser.neko with parameters of type WebResponse Modifier and Type Method Description void
HtmlUnitNekoHtmlParser. parse(WebResponse webResponse, HtmlPage page, boolean xhtml, boolean createdByJavascript)
Parses the WebResponse into an object tree representation. -
Uses of WebResponse in org.htmlunit.javascript.host.xml
Subclasses of WebResponse in org.htmlunit.javascript.host.xml Modifier and Type Class Description private static class
XMLHttpRequest.NetworkErrorWebResponse
Fields in org.htmlunit.javascript.host.xml declared as WebResponse Modifier and Type Field Description private WebResponse
XMLHttpRequest. webResponse_
Methods in org.htmlunit.javascript.host.xml with parameters of type WebResponse Modifier and Type Method Description private boolean
XMLHttpRequest. isPreflightAuthorized(WebResponse preflightResponse)
-
Uses of WebResponse in org.htmlunit.util
Subclasses of WebResponse in org.htmlunit.util Modifier and Type Class Description class
WebResponseWrapper
Provides a convenient implementation of theWebResponse
interface that can be subclassed by developers wishing to adapt a particular WebResponse.Fields in org.htmlunit.util declared as WebResponse Modifier and Type Field Description private WebResponse
WebResponseWrapper. wrappedWebResponse_
Methods in org.htmlunit.util that return WebResponse Modifier and Type Method Description protected WebResponse
FalsifyingWebConnection. createWebResponse(WebRequest wr, java.lang.String content, java.lang.String contentType)
Creates a faked WebResponse for the request with the provided content.protected WebResponse
FalsifyingWebConnection. createWebResponse(WebRequest wr, java.lang.String content, java.lang.String contentType, int responseCode, java.lang.String responseMessage)
Creates a faked WebResponse for the request with the provided content.protected WebResponse
FalsifyingWebConnection. deliverFromAlternateUrl(WebRequest webRequest, java.net.URL url)
Delivers the content for an alternate URL as if it comes from the requested URL.WebResponse
DebuggingWebConnection. getResponse(WebRequest request)
Calls the wrapped webconnection and save the received response.WebResponse
WebConnectionWrapper. getResponse(WebRequest request)
Submits a request and retrieves a response.protected WebResponse
FalsifyingWebConnection. replaceContent(WebResponse wr, java.lang.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.Methods in org.htmlunit.util with parameters of type WebResponse Modifier and Type Method Description static org.w3c.dom.Document
XmlUtils. buildDocument(WebResponse webResponse)
Builds a document from the content of the web response.private static boolean
HeaderUtils. containsCacheControlValue(WebResponse response, java.lang.String value)
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)
private static long
HeaderUtils. directiveValue(WebResponse response, java.util.regex.Pattern pattern)
static long
HeaderUtils. maxAge(WebResponse response)
protected WebResponse
FalsifyingWebConnection. replaceContent(WebResponse wr, java.lang.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.Constructors in org.htmlunit.util with parameters of type WebResponse Constructor Description WebResponseWrapper(WebResponse webResponse)
Constructs a WebResponse object wrapping provided WebResponse. -
Uses of WebResponse in org.htmlunit.webstart
Methods in org.htmlunit.webstart with parameters of type WebResponse Modifier and Type Method Description void
WebStartHandler. handleJnlpResponse(WebResponse webResponse)
Handles the jnlp file response. -
Uses of WebResponse in org.htmlunit.xml
Constructors in org.htmlunit.xml with parameters of type WebResponse Constructor 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.
-