Encodes POST requests to application/x-www-form-urlencoded format.
Behaves like jQuery.param (in fact, is based on v2.1.1 of jQuery), but does not conflict with angular resources, and does not require additional dependencies.
- Link script
<script src="bower_components/angular-post-urlencoded/dist/post-urlencode.js"></script>- Configure Angular to use interceptor
angular.module('main', ['http-post-urlencoded'])
.config(function interceptPOSTRequests($httpProvider) { // Proper post request data encoding
$httpProvider.interceptors.push('postUrlencodeInterceptor');
})