I am using angular js and sails js in my project. I am getting problem with http get() while sending data with special characters from angular to sails.
I want to use http post() instead of http get(). Can anybody help ? My code looks like
var employee = $scope.employee;
$http({
method: 'POST',
url: '/employee/saveEmployee',
headers: {'Content-Type': 'application/json'},
data: {"empName":"employee .empName",
"age":"employee .age",
"designation":"employee .designation",
"empType":"employee .empType"
}
}).success(function (data) {
alert(data);
});
$http.post('/someUrl', {msg:'hello word!'})and does not require changes on sails side in general.