Reputation: 1439
I have an angularjs web application and it has so many files. We use $http
and $resource
for get, post, put and delete. I want to add user info to all request headers from angularjs. In angularjs, is there configuration like this? Or any suggestion for aspect like solution?
Upvotes: 0
Views: 85
Reputation: 606
Yes, you can use request interceptors for this.
See here for some examples: http://www.webdeveasy.com/interceptors-in-angularjs-and-useful-examples/
Upvotes: 2