Skip to content

Commit

Permalink
Merge pull request #14 from slaw-ik/master
Browse files Browse the repository at this point in the history
Append the 'data' parameters to the url of GET request
  • Loading branch information
victorquinn committed Mar 16, 2015
2 parents f7478d1 + 1fc4d18 commit 2e8bdf5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Backbone.CrossDomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@
params.data = Backbone.$.param(Backbone.$.parseJSON(params.data));
}

// Append the .data parameters to the url of GET request
if (params.type === 'GET' && !_.include(params.url, '?') && options.data ){
params.url += '?' + Backbone.$.param(options.data);
}

var xdr = options.xhr = new XDomainRequest(),
success = options.success,
error = options.error;
Expand Down

0 comments on commit 2e8bdf5

Please sign in to comment.