Path: blob/master/node_modules/axios/lib/core/buildFullPath.js
1126 views
'use strict';12var isAbsoluteURL = require('../helpers/isAbsoluteURL');3var combineURLs = require('../helpers/combineURLs');45/**6* Creates a new URL by combining the baseURL with the requestedURL,7* only when the requestedURL is not already an absolute URL.8* If the requestURL is absolute, this function returns the requestedURL untouched.9*10* @param {string} baseURL The base URL11* @param {string} requestedURL Absolute or relative URL to combine12* @returns {string} The combined full path13*/14module.exports = function buildFullPath(baseURL, requestedURL) {15if (baseURL && !isAbsoluteURL(requestedURL)) {16return combineURLs(baseURL, requestedURL);17}18return requestedURL;19};202122