Reputation: 1
I would like to make a request on a server using AJAX.
Now I always get an Internal Server Error 500. In the response I get: "{" F ": {" F ": true," M ":" ServerError: null "}}".
I don't know what I could be doing wrong. I would be very grateful for any suggestions.
This is my code:
<script>
var daten =[{"O":"UPDATE","V":"IjMi"}]};
$.ajax({
data: JSON.stringify(daten),
dataType: 'json',
url: 'https://...',
type: 'POST',
headers: {'X-GWT-Permutation':'07112C32C9E1BAE030C43E092EA21362'},
accepts: 'text/html',
contentType: 'application/json; charset=utf-8',
success: function (result) {
console.log(result);
}
});
</script>
Upvotes: 0
Views: 199
Reputation: 93
one curly braces is missing from daten. It should be like var daten =[{"O":"UPDATE","V":"IjMi"}];
If You again facing same error(Internal Server Error 500) then you need to check your backend code because it is breaking in server side where you are trying to call from ajax call.
Upvotes: 1