function RequestOfType( method, argsArray /* [ 1:url, 2:data, 3:opts, 4:callback ] */){

        var args = argsArray,  // make a local var
            len = args.length, // argsArray.length won't change
            url = '',
            data = null,
            opts = {},
            callback = null,
            arg1 = args[0],
            arg2 = args[1],
            arg3 = args[2],
            arg4 = args[3];

        if (isPlainObject(arg1)){
            // ( opts )
            opts = arg1;
        }
        else {
            // ( url )
            url = arg1;

            if (len === 2){
                // ( url, callback )
                if (isFunction(arg2)){
                    callback = arg2;
                }
                // ( url, opts )
                else if (isPlainObject(arg2)){
                    opts = arg2;
                }
            }
            else if (len === 3){
                // ( url, data, opts )
                if (isPlainObject(arg3)){
                    data = arg2;
                    opts = arg3;
                }
                // ( url, data, callback )
                else if (isFunction(arg3)){
                    data = arg2;
                    callback = arg3;
                }
            }
            else if (len === 4){
                // not really sure we need this one
                // ( url, data, opts, callback )
                data = arg2;
                opts = arg3;
                callback = arg4;
            }
        }

        this.method = method;
        this.url = url;
        this.data = data;
        this.success = callback;

        // copy any leftover opts to {this}
        extendDeep(this, opts);

    }
// no AJAX is done, just setup
no AJAX is done, just setup
no AJAX is done just setup
function RequestOfType( method, argsArray ){
        var args = argsArray,  
            len = args.length, 
            url = '',
            data = null,
            opts = {},
            callback = null,
            arg1 = args[0],
            arg2 = args[1],
            arg3 = args[2],
            arg4 = args[3];
        if (isPlainObject(arg1)){
            opts = arg1;
        }
        else {
            url = arg1;
            if (len === 2){
                if (isFunction(arg2)){
                    callback = arg2;
                }
                else if (isPlainObject(arg2)){
                    opts = arg2;
                }
            }
            else if (len === 3){
                if (isPlainObject(arg3)){
                    data = arg2;
                    opts = arg3;
                }
                else if (isFunction(arg3)){
                    data = arg2;
                    callback = arg3;
                }
            }
            else if (len === 4){
                data = arg2;
                opts = arg3;
                callback = arg4;
            }
        }
        this.method = method;
        this.url = url;
        this.data = data;
        this.success = callback;
        extendDeep(this, opts);
    }
function RequestOfType ( method , argsArray ) { var args = argsArray , len = args . length , url = '' , data = null , opts = { } , callback = null , arg1 = args [ 0 ] , arg2 = args [ 1 ] , arg3 = args [ 2 ] , arg4 = args [ 3 ] ; if ( isPlainObject ( arg1 ) ) { opts = arg1 ; } else { url = arg1 ; if ( len === 2 ) { if ( isFunction ( arg2 ) ) { callback = arg2 ; } else if ( isPlainObject ( arg2 ) ) { opts = arg2 ; } } else if ( len === 3 ) { if ( isPlainObject ( arg3 ) ) { data = arg2 ; opts = arg3 ; } else if ( isFunction ( arg3 ) ) { data = arg2 ; callback = arg3 ; } } else if ( len === 4 ) { data = arg2 ; opts = arg3 ; callback = arg4 ; } } this . method = method ; this . url = url ; this . data = data ; this . success = callback ; extendDeep ( this , opts ) ; }
no AJAX is done, just setup
no AJAX is done just setup
/* [ 1:url, 2:data, 3:opts, 4:callback ] */ // make a local var // argsArray.length won't change // ( opts ) // ( url ) // ( url, callback ) // ( url, opts ) // ( url, data, opts ) // ( url, data, callback ) // not really sure we need this one // ( url, data, opts, callback ) // copy any leftover opts to {this}