fix for sending content-type header during GET requests
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user