I am trying to set the defaults values of $http on an angular application so I have:
var application = angular.module('Application', ['ngDialog', 'validation']).config(function ($http) {
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
});
This originates an error. How and where can I set the defaults of $http?