src/includes/suggestions.js
function (params, method) {
        var that = this,
            request = $.ajax(
                that.getAjaxParams(method, { data: utils.serialize(params) })
            );

        that.abortRequest();
        that.currentRequest = request;
        that.notify('request');

        request.always(function () {
            that.currentRequest = null;
            that.notify('request');
        });

        return request;
    }
function (params, method) {
        var that = this,
            request = $.ajax(
                that.getAjaxParams(method, { data: utils.serialize(params) })
            );

        that.abortRequest();
        that.currentRequest = request;
        that.notify('request');

        request.always(function () {
            that.currentRequest = null;
            that.notify('request');
        });

        return request;
    }
function ( params , method ) { var that = this , request = $ . ajax ( that . getAjaxParams ( method , { data : utils . serialize ( params ) } ) ) ; that . abortRequest ( ) ; that . currentRequest = request ; that . notify ( 'request' ) ; request . always ( function ( ) { that . currentRequest = null ; that . notify ( 'request' ) ; } ) ; return request ; }
Sends an AJAX request to server suggest method.
@param {Object} params request params
@returns {$.Deferred} response promise
Sends an AJAX request to server suggest method .