(String baseURL, String relativeURL)
| 1547 | /// |
| 1548 | /// an absolute URL |
| 1549 | public static String relativeToAbsolute(String baseURL, String relativeURL) { |
| 1550 | if (relativeURL.startsWith("/")) { |
| 1551 | return getURLProtocol(baseURL) + "://" + getURLHost(baseURL) + relativeURL; |
| 1552 | } else { |
| 1553 | return getURLProtocol(baseURL) + "://" + getURLHost(baseURL) + getURLBasePath(baseURL) + relativeURL; |
| 1554 | } |
| 1555 | } |
| 1556 | |
| 1557 | /// Returns the protocol of an absolute URL e.g. http, https etc. |
| 1558 | /// |
no test coverage detected