My services are hosted on a remote server, and I am consuming these services in a local AngularJS app. Everything works fine with REST requests that do not require a SessionID in the header. However, when I add the Session ID in the header, it does not work and gives me a 404 error.
app.factory('Dashboard', function($resource, $http) {
return {
GetDashboardData : function(sessionid, id) {
alert(sessionid + '\n' + id);
var config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'SessionID': sessionid
}
};
return $http.post('url goes here'+id, config);
}
}
});