mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Adding comments
This commit is contained in:
@@ -11,6 +11,13 @@ function encode(val) {
|
||||
replace(/%20/g, '+');
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a URL by appending params to the end
|
||||
*
|
||||
* @param {string} url The base of the url (e.g., http://www.google.com)
|
||||
* @param {object} [params] The params to be appended
|
||||
* @returns {string} The formatted url
|
||||
*/
|
||||
module.exports = function buildUrl(url, params) {
|
||||
if (!params) {
|
||||
return url;
|
||||
@@ -42,4 +49,4 @@ module.exports = function buildUrl(url, params) {
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user