Changeset 828 for trunk/zoo-project/zoo-api/js
- Timestamp:
- May 23, 2017, 1:54:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-api/js/ZOO-api.js
r625 r828 436 436 * url - {String} The URL to request. 437 437 * params - {Object} Params to add to the url 438 * headers - {Object/Array} A key-value object of headers 438 439 * 439 440 * Returns: 440 441 * {String} Request result. 441 442 */ 442 Get: function(url,params) {443 Get: function(url,params,headers) { 443 444 var paramsArray = []; 444 445 for (var key in params) { … … 466 467 url += separator + paramString; 467 468 } 468 return ZOORequest('GET',url); 469 if(!(headers instanceof Array)) { 470 var headersArray = []; 471 for (var name in headers) { 472 headersArray.push(name+': '+headers[name]); 473 } 474 headers = headersArray; 475 } 476 return ZOORequest('GET',url,headers); 469 477 }, 470 478 /**
Note: See TracChangeset
for help on using the changeset viewer.