(baseURL, requestedURL, allowAbsoluteUrls, config)
| 40 | * @returns {string} The combined full path |
| 41 | */ |
| 42 | export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { |
| 43 | assertValidHttpProtocolURL(requestedURL, config); |
| 44 | let isRelativeUrl = !isAbsoluteURL(requestedURL); |
| 45 | if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { |
| 46 | assertValidHttpProtocolURL(baseURL, config); |
| 47 | return combineURLs(baseURL, requestedURL); |
| 48 | } |
| 49 | return requestedURL; |
| 50 | } |
no test coverage detected