Merge pull request #267 from jasondavies/master.

Don't set content type header for GET requests
This commit is contained in:
Jeremy Ashkenas
2011-05-01 06:48:17 -07:00

View File

@@ -986,7 +986,6 @@
// Default JSON-request options.
var params = _.extend({
type: type,
contentType: 'application/json',
dataType: 'json',
processData: false
}, options);
@@ -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());
}