I'm working on an app whose back-end is django based, data is available through tastypie APIs and front is based on angularJS.
I am doing a POST request
$http.post('/manager/api/std/attendence/',dataObj)
.success(function(data, status, headers, config) {
alert("Attendence Posted");
}).error(function(data, status, headers, config) {
alert( "failure message: " + status);
});
but i am receiving a 401(unauthorized) error so i checked network panel in browser to view the requests being made and i was surprised as
first a GET request is made to the url specified in post and then the POST request is made but the url changes to page url.
this app doesn't require authentication(login) so, can any one help in figuring out why this post request is not working.