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

Method expandUrl

src/main/java/org/htmlunit/WebClient.java:1358–1361  ·  view source on GitHub ↗

Expands a relative URL relative to the specified base. In most situations this is the same as new URL(baseUrl, relativeUrl) but there are some cases that URL doesn't handle correctly. See RFC1808 regarding Relative Uniform Resource Loc

(final URL baseUrl, final String relativeUrl)

Source from the content-addressed store, hash-verified

1356 * @throws MalformedURLException if an error occurred when creating a URL object
1357 */
1358 public static URL expandUrl(final URL baseUrl, final String relativeUrl) throws MalformedURLException {
1359 final String newUrl = UrlUtils.resolveUrl(baseUrl, relativeUrl);
1360 return UrlUtils.toUrlUnsafe(newUrl);
1361 }
1362
1363 private WebResponse makeWebResponseForDataUrl(final WebRequest webRequest) throws IOException {
1364 final URL url = webRequest.getUrl();

Callers 6

expandUrlMethod · 0.95
expandUrlWithFileMethod · 0.95
getWebRequestMethod · 0.95
getFullyQualifiedUrlMethod · 0.95

Calls 2

resolveUrlMethod · 0.95
toUrlUnsafeMethod · 0.95

Tested by 3

expandUrlMethod · 0.76
expandUrlWithFileMethod · 0.76