function executeRequest(request, resolve, reject) {
    var args = [
        request.req,
        request.resource,
        request._params,
        request._clientConfig,
        function executeRequestCallback(err, data, meta) {
            if (err) {
                reject({
                    err: err,
                    meta: meta,
                });
            } else {
                resolve({
                    data: data,
                    meta: meta,
                });
            }
        },
    ];
    var op = request.operation;
    if (op === OP_CREATE || op === OP_UPDATE) {
        args.splice(3, 0, request._body);
    }
    var service;
    try {
        service = Fetcher.getService(request.resource);
        if (!service[op]) {
            throw new Error(
                'operation: ' +
                    op +
                    ' is undefined on service: ' +
                    request.resource
            );
        }
        service[op].apply(service, args);
    } catch (err) {
        reject({ err: err });
    }
}
/**
 * Execute and resolve/reject this fetcher request
 * @method executeRequest
 * @param {Object} request Request instance object
 * @param {Function} resolve function to call when request fulfilled
 * @param {Function} reject function to call when request rejected
 */
Execute and resolve/reject this fetcher request
@method executeRequest
@param {Object} request Request instance object
@param {Function} resolve function to call when request fulfilled
@param {Function} reject function to call when request rejected
Execute and resolve / reject this fetcher request @method executeRequest @param { Object } request Request instance object @param { Function } resolve function to call when request fulfilled @param { Function } reject function to call when request rejected
function executeRequest(request, resolve, reject) {
    var args = [
        request.req,
        request.resource,
        request._params,
        request._clientConfig,
        function executeRequestCallback(err, data, meta) {
            if (err) {
                reject({
                    err: err,
                    meta: meta,
                });
            } else {
                resolve({
                    data: data,
                    meta: meta,
                });
            }
        },
    ];
    var op = request.operation;
    if (op === OP_CREATE || op === OP_UPDATE) {
        args.splice(3, 0, request._body);
    }
    var service;
    try {
        service = Fetcher.getService(request.resource);
        if (!service[op]) {
            throw new Error(
                'operation: ' +
                    op +
                    ' is undefined on service: ' +
                    request.resource
            );
        }
        service[op].apply(service, args);
    } catch (err) {
        reject({ err: err });
    }
}
function executeRequest ( request , resolve , reject ) { var args = [ request . req , request . resource , request . _params , request . _clientConfig , function executeRequestCallback ( err , data , meta ) { if ( err ) { reject ( { err : err , meta : meta , } ) ; } else { resolve ( { data : data , meta : meta , } ) ; } } , ] ; var op = request . operation ; if ( op === OP_CREATE || op === OP_UPDATE ) { args . splice ( 3 , 0 , request . _body ) ; } var service ; try { service = Fetcher . getService ( request . resource ) ; if ( ! service [ op ] ) { throw new Error ( 'operation: ' + op + ' is undefined on service: ' + request . resource ) ; } service [ op ] . apply ( service , args ) ; } catch ( err ) { reject ( { err : err } ) ; } }
Execute and resolve/reject this fetcher request
 @method executeRequest
 @param {Object} request Request instance object
 @param {Function} resolve function to call when request fulfilled
 @param {Function} reject function to call when request rejected
Execute and resolve / reject this fetcher request @method executeRequest @param { Object } request Request instance object @param { Function } resolve function to call when request fulfilled @param { Function } reject function to call when request rejected