setting content type to JSON for http PATCH

Updating OperationView.coffee to add JSON content type for PATCH 
similar to POST and PUT so that the newly added PATCH works fine
This commit is contained in:
Arul
2012-10-02 01:42:48 +08:00
parent 8d39588524
commit 1429ee3eba

View File

@@ -78,7 +78,7 @@ class OperationView extends Backbone.View
complete: (data) =>
@showCompleteStatus(data)
obj.contentType = "application/json" if (obj.type.toLowerCase() == "post" or obj.type.toLowerCase() == "put")
obj.contentType = "application/json" if (obj.type.toLowerCase() == "post" or obj.type.toLowerCase() == "put" or obj.type.toLowerCase() == "patch")
jQuery.ajax(obj)
false