In the code below, the AngularJS $http
method calls the URL, and submits the xsrf object as a \"Request Payload\" (as described in the Chrome debugger network t
The continued confusion surrounding this issue inspired me to write a blog post about it. The solution I propose in this post is better than your current top rated solution because it does not restrict you to parametrizing your data object for $http service calls; i.e. with my solution you can simply continue to pass actual data objects to $http.post(), etc. and still achieve the desired result.
Also, the top rated answer relies on the inclusion of full jQuery in the page for the $.param() function, whereas my solution is jQuery agnostic, pure AngularJS ready.
http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
Hope this helps.