dist/hawtio-utilities.js
function onSuccess(fn, options) {
        if (options === void 0) { options = {}; }
        options['mimeType'] = 'application/json';
        if (!_.isUndefined(fn)) {
            options['success'] = fn;
        }
        if (!options['method']) {
            options['method'] = "POST";
        }
        // the default (unsorted) order is important for Karaf runtime
        options['canonicalNaming'] = false;
        options['canonicalProperties'] = false;
        if (!options['error']) {
            options['error'] = function (response) { return defaultJolokiaErrorHandler(response, options); };
        }
        return options;
    }
function onSuccess(fn, options) {
        if (options === void 0) { options = {}; }
        options['mimeType'] = 'application/json';
        if (!_.isUndefined(fn)) {
            options['success'] = fn;
        }
        if (!options['method']) {
            options['method'] = "POST";
        }
        // the default (unsorted) order is important for Karaf runtime
        options['canonicalNaming'] = false;
        options['canonicalProperties'] = false;
        if (!options['error']) {
            options['error'] = function (response) { return defaultJolokiaErrorHandler(response, options); };
        }
        return options;
    }
function onSuccess ( fn , options ) { if ( options === void 0 ) { options = { } ; } options [ 'mimeType' ] = 'application/json' ; if ( ! _ . isUndefined ( fn ) ) { options [ 'success' ] = fn ; } if ( ! options [ 'method' ] ) { options [ 'method' ] = "POST" ; } // the default (unsorted) order is important for Karaf runtime options [ 'canonicalNaming' ] = false ; options [ 'canonicalProperties' ] = false ; if ( ! options [ 'error' ] ) { options [ 'error' ] = function ( response ) { return defaultJolokiaErrorHandler ( response , options ) ; } ; } return options ; }
Pass in null for the success function to switch to sync mode

@method onSuccess
@static
@param {Function} Success callback function
@param {Object} Options object to pass on to Jolokia request
@return {Object} initialized options object
Pass in null for the success function to switch to sync mode