Requesting server API deprecated

http class is intended as centralized server communication layer currently heavily used in our front end APIs

based on this oxpedia article

  • located at io.ox/core/http.js

HTTP facades

general example

http.GET({
        module: 'mail',
        params: {
            action: 'all',
            folder: 'default0/INBOX'
        }
    });

Column Mappings

server requests

  • still require use of columns ids

server response

  • column_id keys will be replaced with column names to ease handling

Request Stacking

  • stack ability for calls to minimize overhead of server communication pause() and resume()

example

// pause http layer
http.pause();

// process all updates
_(list).map(function (item) {
    return http.PUT({
        module: 'calendar',
        params: {
            action: 'update',
            id: item.id,
            folder: item.folder_id,
            timestamp: item.timestamp
        },
        data: {  ...  },
    });
});

// resume & trigger refresh
http.resume()