_.extend(sinon.fakeServer, {

    reset: function() {
        this.requests = [];
    },

    creates: function() {
        return _.filter(this.requests, function(request) {
            return request.method === "POST";
        });
    },

    fetches: function() {
        return _.filter(this.requests, function(request) {
            return request.method === "GET";
        });
    },

    updates: function() {
        return _.filter(this.requests, function(request) {
            return request.method === "PUT"
        });
    },

    destroys: function() {
        return _.filter(this.requests, function(request) {
            return request.method === "DELETE";
        });
    },

    lastRequest: function() {
        return _.last(this.requests);
    },

    lastCreate: function() {
        return _.last(this.creates());
    },

    lastFetch: function() {
        return _.last(this.fetches());
    },

    lastUpdate: function() {
        return _.last(this.updates());
    },

    lastDestroy: function() {
        return _.last(this.destroys());
    },

    lastCreateFor: function(model) {
        return _.last(_.filter(this.creates(), function(potentialRequest) {
            var uri = new URI(potentialRequest.url);
            var modelUri = new URI(model.url());
            return uri.equals(modelUri);
        }));
    },

    lastFetchFor: function(model, options) {
        options = options || {};
        options.method = 'read';
        return _.last(_.filter(this.fetches(), function(potentialRequest) {
            var uri = new URI(potentialRequest.url).removeSearch("rows");
            var modelUri = new URI(model.url(options)).removeSearch("rows");
            return uri.equals(modelUri);
        }));
    },

    lastFetchAllFor: function(model, overrides) {
        return this.lastFetchFor(model, _.extend({ rows: 1000}, overrides));
    },

    completeFetchFor: function(model, results, options, pagination) {
        if (results) {
            results = results.attributes ? results.attributes : results;
        } else if (model instanceof Backbone.Model) {
            results = model.attributes;
        } else {
            results = [];
        }

        var fetch = this.lastFetchFor(model, options)
        if (fetch) {
            fetch.succeed(results, pagination);
        } else {
            throw "No fetch found for " + model.url() + ". Found fetches for: [" + _.pluck(this.fetches(), 'url').join(', ') + "]";
        }
    },

    completeSaveFor: function(model, results) {
        if (results) {
            results = results.attributes ? results.attributes : results;
        } else {
            results = model.attributes;
        }

        var create = this.lastCreateFor(model);
        if (create) {
            create.succeed(results);
        } else {
            throw "No create found for " + model.url() + ". Found creates for: [" + _.pluck(this.creates(), 'url').join(', ') + "]";
        }
    },

    completeFetchAllFor: function(model, results, options, pagination) {
        options = options || {page: 1, rows: 1000};
        pagination = pagination || {page: 1, total: 1, records: 1};
        this.completeFetchFor(model, results, options, pagination);
    },

    completeAllFetches: function(pagination) {
        pagination = pagination || {page: 1, total: 1, records: 1};
        _.each(this.fetches(), function(request) {
            request.succeed([], pagination);
        });
    }
});

_.extend(sinon.FakeXMLHttpRequest.prototype, {
    succeed: function(models, pagination) {
        if (!_.isArray(models)) models = [models];
        var resource = _.map(models, function(model) {
            if (model instanceof Backbone.Model) {
                return model.attributes;
            } else {
                return model;
            }
        });

        return this.respond(
            200,
            { 'Content-Type': 'application/json' },
            JSON.stringify({
                status: "ok",
                resource: resource,
                pagination: pagination
            })
        );
    },

    fail: function(message) {
        return this.respond(
            200,
            { 'Content-Type': 'application/json' },
            JSON.stringify({
                status: "fail",
                resource: [],
                message: message || "something went wrong!"
            })
        );
    },

    params: function() {
        var uri = new URI("?" + this.requestBody)
        return uri.search(true);
    },

    error: function(message) {
        return this.respond(
            404,
            {},
            ''
        )
    }
});

@@ -4464,42 +4464,156 @@
  uri
- = new URI(%22?%22 + this.requestBody)
+;%0A        if (this.requestBody) %7B%0A            uri = new URI(%22?%22 + this.requestBody)%0A        %7D else %7B%0A            uri = new URI(this.url);%0A        %7D%0A
 %0A   

Fix server url params to get normal post URL params