Pre-req script to set 'csrf-token' var for POST req in Flask

Hey @kallenatgmail :wave:

Welcome to the Postman Community! :postman:

In your pm.sendRequest you using an arg called html and then using that in the cheerio.load().

If you’re using pm.sendRequest and are looking to use the response from that call, I would try and use cheerio.load(response.text()) to see if that give you what you need to extract the token.

Related post: