Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #267 from jasondavies/master.
Don't set content type header for GET requests
  • Loading branch information
jashkenas committed May 1, 2011
2 parents d8edb5d + ee2ec92 commit 82e0b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Expand Up @@ -986,7 +986,6 @@
// Default JSON-request options.
var params = _.extend({
type: type,
contentType: 'application/json',
dataType: 'json',
processData: false
}, options);
Expand All @@ -998,6 +997,7 @@

// Ensure that we have the appropriate request data.
if (!params.data && model && (method == 'create' || method == 'update')) {
params.contentType = 'application/json';
params.data = JSON.stringify(model.toJSON());
}

Expand Down

0 comments on commit 82e0b34

Please sign in to comment.