mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
24 lines
515 B
JavaScript
24 lines
515 B
JavaScript
(function (globalScope) {
|
|
|
|
globalScope.HttpClient = {
|
|
|
|
param: function (params) {
|
|
return jQuery.param(params);
|
|
},
|
|
|
|
send: function (request) {
|
|
|
|
request.timeout = request.timeout || 30000;
|
|
|
|
try {
|
|
return jQuery.ajax(request);
|
|
} catch (err) {
|
|
var deferred = DeferredBuilder.Deferred();
|
|
deferred.reject();
|
|
return deferred.promise();
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
})(window); |