Sfoglia il codice sorgente

Problem sending parameters via POST

Jquery seems to fail posting data as POST params if contentType is overwritten. At least in chrome
bubble
Артём Курапов 12 anni fa
parent
commit
4ebfd081c0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      src/main/coffeescript/view/OperationView.coffee

+ 1
- 1
src/main/coffeescript/view/OperationView.coffee Vedi 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" or obj.type.toLowerCase() == "patch")
obj.contentType = "application/json" if (obj.type.toLowerCase() == "put" or obj.type.toLowerCase() == "patch")
jQuery.ajax(obj)
false


Caricamento…
Annulla
Salva