I'm trying to access CSRF Token received from POST response header, which I need to send back with every further request from my app. I'm was able to drill down the response stream until I could access the [[Entries]] which has the "csrfpreventionsalt" token. It gets displayed in console but when trying to access it shows as undefined.
Tried & Tested: I've tried the "get" method to access the header but it didn't work.
var csrf = res.headers.get('csrfpreventionsalt');
I've seen other questions on SO which say that you can't access the header value but If I can access the header in console then definately I should be able to access the token & assign it to a variable.
Solution to this might help others as well who could face the same situation in their apps. Any help is welcome !!