mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -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); |