If I want to read the value of something in the html body response, I can do this
vars['authenticity_token'] = response
.html()
.find('meta[name="csrf-token"]')
.first()
.attr('content')
But I am trying to find a custom header that we are setting and can’t seem to extract it. I’ve tried variations like this, but nothing seems to work.
vars['header_token'] = response
.header()
.find('custom_header')
.first()
.attr('content')
I specifically need these values from a POST response that we are submitting.