MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / WebRequest

Method WebRequest

src/main/java/org/htmlunit/WebRequest.java:102–111  ·  view source on GitHub ↗

Instantiates a WebRequest for the specified URL. @param url the target URL @param acceptHeader the accept header to use @param acceptEncodingHeader the accept encoding header to use

(final URL url, final String acceptHeader, final String acceptEncodingHeader)

Source from the content-addressed store, hash-verified

100 * @param acceptEncodingHeader the accept encoding header to use
101 */
102 public WebRequest(final URL url, final String acceptHeader, final String acceptEncodingHeader) {
103 setUrl(url);
104 if (acceptHeader != null) {
105 setAdditionalHeader(HttpHeader.ACCEPT, acceptHeader);
106 }
107 if (acceptEncodingHeader != null) {
108 setAdditionalHeader(HttpHeader.ACCEPT_ENCODING, acceptEncodingHeader);
109 }
110 timeout_ = -1;
111 }
112
113 /**
114 * Instantiates a {@link WebRequest} for the specified URL.

Callers

nothing calls this directly

Calls 5

setUrlMethod · 0.95
setAdditionalHeaderMethod · 0.95
setCharsetMethod · 0.95
setRefererHeaderMethod · 0.95
setHttpMethodMethod · 0.95

Tested by

no test coverage detected