var ajax_helper = {
    ajaxDataCallback: function (url,type, datatype, data, header) {
        var returnData;
       $.ajax({
                async: false,
                type: type,
                url: url,
                dataType: datatype,
                data: data,
                headers:header,
                error: function (jqXHR, textStatus, errorMessage) {
                    console.log("Error: ", errorMessage);
                },
                success: function (result) {
                    returnData= result;
                }
            });
       return returnData;
    },
    ajaxAsyncDataCallback: function (url,type, datatype, data, header, callback) {
        $.ajax({
            async: true,
            type: type,
            url: url,
            dataType: datatype,
            data: data,
            headers:header,
            error: function (jqXhr, textStatus, errorMessage) {
                console.log("Error: ", errorMessage);
            },
            success: function (data, textStatus) {
                callback(data);
            }

        });

    },

}
