I have recorded login scenario of a page (built on Java and Angular) and the very first request doesn't show X-CSRF-TOKEN in the Response Data tab, but the second HTTP request has X-CSRF-TOKEN in the HTTP Header Manager, and when I try to run the script the 2nd HTTP Request shows the response code 401 as the recorded X-CSRF-TOKEN is no longer valid, so I was wondering how to write a regular expression to capture the X-CSRF-TOKEN by creating reg expression as a post processor.
Please let know how to capture the X-CSRF-TOKEN dynamically.
Thanks