You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
i'm too new to javascript and to angularjs so i can't make a proper implementation but for now i hacked the /src/ngResource/resource.js file with the following code to make this work (inserted the custom code on line 557):
if(hasBody)httpConfig.data=data;route.setUrlParams(httpConfig,extend({},extractParams(data,action.params||{}),params),action.url);//******************************************************//custom code to make dynamic headers workvargetHeaders=function(config,params){varresult=extend({},config.headers);varheaderParams=extend({},config.headers);forEach(headerParams,function(value,key){if(value.charAt(0)=='@'){result[key]=params[value.substr(1)];}});returnresult;}httpConfig.headers=getHeaders(httpConfig,params);//******************************************************
maybe someone can take this and make a proper implementation out of it