Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Content-Type have to be application/x-www-form-urlencoded otherwise D…

…jango discards POST data

More info about it on django/django@dfd4a71
  • Loading branch information...
commit c23085e7b91117bec42114048ee71ca771b7f8d2 1 parent 73b9a19
@horejsek horejsek authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  dajaxice/templates/dajaxice/dajaxice.core.js
View
1  dajaxice/templates/dajaxice/dajaxice.core.js
@@ -42,6 +42,7 @@ var Dajaxice = {
endpoint = endpoint + '?' + send_data;
}
oXMLHttpRequest.open(method, endpoint);
+ oXMLHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
oXMLHttpRequest.setRequestHeader("X-Requested-With", "XMLHttpRequest");
oXMLHttpRequest.setRequestHeader("X-CSRFToken", Dajaxice.get_cookie('{{ dajaxice_config.django_settings.CSRF_COOKIE_NAME }}'));
oXMLHttpRequest.onreadystatechange = function() {
Please sign in to comment.
Something went wrong with that request. Please try again.