function loadResource(sUrl, sType) {
		return new Promise(function (resolve, reject) {
			jQuery.ajax({
				url: sUrl,
				async: true,
				dataType: sType,
				success: function (oJson) {
					resolve(oJson);
				},
				error: function () {
					reject();
				}
			});
		});
	}
function loadResource(sUrl, sType) {
		return new Promise(function (resolve, reject) {
			jQuery.ajax({
				url: sUrl,
				async: true,
				dataType: sType,
				success: function (oJson) {
					resolve(oJson);
				},
				error: function () {
					reject();
				}
			});
		});
	}
function loadResource ( sUrl , sType ) { return new Promise ( function ( resolve , reject ) { jQuery . ajax ( { url : sUrl , async : true , dataType : sType , success : function ( oJson ) { resolve ( oJson ) ; } , error : function ( ) { reject ( ) ; } } ) ; } ) ; }
Loads a resource of a given type async and returns a promise
@param {string} sUrl the URL to load
@param {string} sType the expected type of response "json" or "text"
@retunrs {Promise}
@private
Loads a resource of a given type async and returns a promise
Load a resource