Trying to study angular. To write a product review on the service, you need to pass token in the http request header. How can I do that? Here is the code:
$scope.savingcomment = function (answer, answerForm){ console.log($scope.answer.comment); $http.post("http://smktesting.herokuapp.com/api/reviews/2",{"rate":5,"text":"fffddf"}).success(function (answ) { console.log($scope.answer.comment); }) .error(function (err) { console.log('Что-то пошло не так'); }) };