I'm having some difficulties implementing a post request to my Spring Rest service running on localhost.
Now the request and the service both work, the current problem is that I keep receiving the same error, saying that my JSON is incorrect.
The code which I use for creating the JSON request:
$scope.addComment = function(){
var url = "http://localhost:8080/evenement/"+evenementId+"/deelnemers/"+deelnemer.id+"/addComment";
$http.post(url, {"content" : $scope.data.comment, "author":"testUser"}).then(function(res){
$scope.response = res.data;
console.log(res.data);
});
};
I tried removing the quotes, using single quotes and using no quotes, as answered on other questions with the same problem.

{"content" : $scope.data.comment, "author":"testUser"}where the$scope.data.commentis replaced by a value out of a input field.