Reputation: 67
I've got a angular application that displays records, and gives the user the ability to add records.
Everything works perfect on desktop or iOS devices, but on android devices, the POST method fails(403 - forbidden).
this is the code in my service:
obj.getRecords = function() {
return $http.get(serviceBase + 'records');
};
obj.getRecord = function(id) {
return $http.get(serviceBase + 'record/' + id);
};
obj.saveRecord = function(record) {
return $http.post(serviceBase + 'record', record);
};
Anyone experienced with this problem?
Upvotes: 2
Views: 981
Reputation: 879
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
might fix your problem.
Reference: Angular docs
Upvotes: 1
Reputation: 128
I could imagine that it could have to do with an apple touch icon that is integrated into your site. I had it once that it missing (even if iPhones worked!) caused redirection to another site with another session id. This also caused a 403. It's just an idea though. It seems that the Android browser has some other way of retrieving the touch icon which is the error's cause.
Upvotes: 1