I'm trying to extract the XSRF-TOKEN from the cookies and use it as a variable, is that possible with Taurus?
For example, on each request, I get a response that looks like this:
XSRF-TOKEN=eyJpdiI6Im94UURqMUphbUN6Nmo1WlIrblBDVGc9PSIsInZhbHVlIjoiVEJxbTJLVVRnZitmWUlXLzdlRGpCSnRjcTB6cDB0cXRWU3Nrd3hOeitqbWRuK0dyNFdTOEZhalh6T1owaGxiKy9LN2NBbkNiOFdnd3Nkb081VTlTOFV5bEZqTjFaSkdWV1JJMHVlRjBwNUE0M24yVE5wamdRU1hyYkZXdE8vaUMiLCJtYWMiOiI0NDAxNGNmZmI5NTZmZjdjOTg5YzBlZGZjOTZkYTdmZTVmMjZlMjk1ZGM1ZjBjYWMzM2NiMjZlMjhhY2RhYTg1In0=; expires=Thu, 09-Sep-2021 16:50:42 GMT; Max-Age=7200; path=/; domain=.
example.com
Similar to how you can do extract-regexp, for subject of url or whatever, can you extract from cookies?
For example:
- url: '/agent/dashboard'
extract-regexp:
xsrf_token:
default: NO_XSRF_TOKEN_FOUND
match-no: 1
regexp: 'XSRF-TOKEN: (.+?)'
template: $1$
subject: cookie
Is something like this possible?
Thanks.