MCPcopy Create free account
hub / github.com/apache/cloudstack / buildUrl

Function buildUrl

tools/ngui/static/js/lib/angular.js:9197–9208  ·  view source on GitHub ↗
(url, params)

Source from the content-addressed store, hash-verified

9195
9196
9197 function buildUrl(url, params) {
9198 if (!params) return url;
9199 var parts = [];
9200 forEachSorted(params, function(value, key) {
9201 if (value == null || value == undefined) return;
9202 if (isObject(value)) {
9203 value = toJson(value);
9204 }
9205 parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
9206 });
9207 return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
9208 }
9209
9210
9211 }];

Callers 1

sendReqFunction · 0.85

Calls 4

forEachSortedFunction · 0.85
isObjectFunction · 0.85
toJsonFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected