I have read about AngularJS post request header which is application/json
But I want to change it to:
Content-Type=application/x-www-form-urlencoded; charset=UTF-8
I do the following but the post request is still sent with the same application/json
Here is the Angular:
$http.post("server.php", checkUserPostData,
{"headers" : "Content-Type=application/x-www-form-urlencoded; charset=UTF-8"})
.success(function(data, status, header, config){
if(data=='exists')
return true;
else return false;
});
How should I set the config header of the request then?