function consoleAjaxCmd(method, resturl, ajaxdata, success_call) {
    $.ajax({
        type: 'GET',
        url: '/csrfToken',
        success: function success(msg, status, jqXHR) {
            var csrf = '&_csrf=' + msg._csrf;
            $.ajax({
                type: method,
                url: resturl,
                data: ajaxdata + csrf,
                success: success_call,
                error: function error(XMLHttpRequest, textStatus, errorThrown) {
                    divConsoleAlert('alert-danger', textStatus.toUpperCase() + ': ', errorThrown);
                }
            });
        },
        error: function error(XMLHttpRequest, textStatus, errorThrown) {
            divConsoleAlert('alert-danger', textStatus.toUpperCase() + ': ', errorThrown);
        }
    });
}
/*
    consoleAjaxCmd is used to call ajax commands to APIs
*/
consoleAjaxCmd is used to call ajax commands to APIs
consoleAjaxCmd is used to call ajax commands to APIs
function consoleAjaxCmd(method, resturl, ajaxdata, success_call) {
    $.ajax({
        type: 'GET',
        url: '/csrfToken',
        success: function success(msg, status, jqXHR) {
            var csrf = '&_csrf=' + msg._csrf;
            $.ajax({
                type: method,
                url: resturl,
                data: ajaxdata + csrf,
                success: success_call,
                error: function error(XMLHttpRequest, textStatus, errorThrown) {
                    divConsoleAlert('alert-danger', textStatus.toUpperCase() + ': ', errorThrown);
                }
            });
        },
        error: function error(XMLHttpRequest, textStatus, errorThrown) {
            divConsoleAlert('alert-danger', textStatus.toUpperCase() + ': ', errorThrown);
        }
    });
}
function consoleAjaxCmd ( method , resturl , ajaxdata , success_call ) { $ . ajax ( { type : 'GET' , url : '/csrfToken' , success : function success ( msg , status , jqXHR ) { var csrf = '&_csrf=' + msg . _csrf ; $ . ajax ( { type : method , url : resturl , data : ajaxdata + csrf , success : success_call , error : function error ( XMLHttpRequest , textStatus , errorThrown ) { divConsoleAlert ( 'alert-danger' , textStatus . toUpperCase ( ) + ': ' , errorThrown ) ; } } ) ; } , error : function error ( XMLHttpRequest , textStatus , errorThrown ) { divConsoleAlert ( 'alert-danger' , textStatus . toUpperCase ( ) + ': ' , errorThrown ) ; } } ) ; }
consoleAjaxCmd is used to call ajax commands to APIs
consoleAjaxCmd is used to call ajax commands to APIs