1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/apiclient/ajax.js

24 lines
515 B
JavaScript
Raw Normal View History

(function (globalScope) {
2015-06-30 13:21:20 -04:00
globalScope.HttpClient = {
2015-05-25 13:32:22 -04:00
param: function (params) {
return jQuery.param(params);
},
2015-06-30 13:21:20 -04:00
send: function (request) {
2015-05-25 13:32:22 -04:00
request.timeout = request.timeout || 30000;
2015-05-21 16:53:14 -04:00
try {
return jQuery.ajax(request);
} catch (err) {
var deferred = DeferredBuilder.Deferred();
deferred.reject();
return deferred.promise();
}
}
};
})(window);