var users= $resource('http://myapp.herokuapp.com/users', {});
users.get();
After adding header method, http GET method change to OPTION
var users= $resource('http://myapp.herokuapp.com/users', {}, {
get:{
method:"GET",
headers:{'x-access-token':'token'}
}
});
users.get();
Please guide me why GET method change to OPTION Method.