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

Method getHost

src/main/java/org/htmlunit/javascript/host/URL.java:142–149  ·  view source on GitHub ↗

@return the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', followed by the port of the URL.

()

Source from the content-addressed store, hash-verified

140 * a ':', followed by the port of the URL.
141 */
142 @JsxGetter
143 public String getHost() {
144 if (url_ == null) {
145 return null;
146 }
147 final int port = url_.getPort();
148 return url_.getHost() + (port > 0 ? ":" + port : "");
149 }
150
151 /**
152 * Sets the {@code host} property.

Callers 15

originMethod · 0.95
documentOriginMethod · 0.95
cookie_readMethod · 0.95
sameFileMethod · 0.95
getResponseMethod · 0.95
makeHttpMethodMethod · 0.95
getCookiesMethod · 0.95
buildCookieOriginMethod · 0.95
getHostMethod · 0.95
postMessageMethod · 0.95
postMessageMethod · 0.95

Calls 1

getPortMethod · 0.45

Tested by 15

originMethod · 0.76
documentOriginMethod · 0.76
cookie_readMethod · 0.76
sameFileMethod · 0.76
checkSettingsMethod · 0.36
proxyConfigMethod · 0.36
proxyConfigForJSMethod · 0.36
cookie_nullValueMethod · 0.36
cookie_maxAgeMinusOneMethod · 0.36
checkCookieMethod · 0.36
originHeaderGetMethod · 0.36