PageSourceSearch

https://ez-ocm.ru/DESIGN/SITE/js/app/Api.js

js ez-ocm.ru collected 2026-09-30 16:47:05 UTC 1,208 bytes, 35 lines download raw bytes

1;(function (App, document, window, $, undefined) {
2    App.define('components.api');
3
4    var Api = function () {
5
6    };
7
8    Api.prototype.fetch = function (url, options) {
9        options = options || {};
10        options.data = options.data || {};
11        options.successCallback = options.successCallback || function (response) {};
12        options.errorCallback = options.errorCallback || function (response) {};
13        $.ajax({
14            url: url,
15            type: 'POST',
16            data: options.data,
17            dataType: 'json',
18            success: function (response) {
19                response.data = response.data || {};
20                response.status = response.status || {};
21                response.status.code = response.status.code || 0;
22                if (response.status.code == 200) {
23                    options.successCallback(response);
24                } else {
25                    options.errorCallback(response);
26                }
27            },
28            error: function (response) {
29                options.errorCallback(response);
30            }
31        });
32    };
33
34    App.components.api = new Api();
35})(App, document, window, jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.