In karate, I want to use the Response data(Scenario 1) to next or another request(Scenario 2) as Json.
I'm not able to pass it with def also. Can anyone help
Scenario 1: POST : User Given path '/authentication/v1/token/passwordless' And headers headers And request { username : '#(activeUsername)' } When method POST Then status 200 And print response
- def passwordLessToken = response.tokenValue And print passwordLessToken
Scenario 2: POST With Session Detail : Valid Token from Passwordless Given path '/authentication/v1/token/ltpa' And headers withPasswordHeaders And request { tokenName : '#(tokenName)', tokenValue : +'passwordLessToken' } When method POST Then status 200 And print response