fix for sending content-type header during GET requests

This commit is contained in:
Tony Tam
2013-04-05 13:29:14 -07:00
parent e66c08907d
commit 8b1cf18daa
3 changed files with 11 additions and 2 deletions

View File

@@ -153,9 +153,13 @@ class OperationView extends Backbone.View
if paramContentTypeField
obj.contentType = paramContentTypeField
if not obj.data
log 'content type = ' + obj.contentType
if not obj.data or (obj.type is 'GET' or obj.type is 'DELETE')
obj.contentType = false
log 'content type is now = ' + obj.contentType
responseContentTypeField = $('.content > .content-type > div > select[name=contentType]', $(@el)).val()
if responseContentTypeField
obj.headers = if obj.headers? then obj.headers else {}